Skip to content

Commit 36493d9

Browse files
committed
update readme, bump version
1 parent 2d2fec4 commit 36493d9

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

README.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Python client for the Ouster Lidar OS-1
22

3-
Compatible with Firmware Version 1.6.0 and python 3
4-
> Your milage may vary with other versions, it was tested against a device running 1.6.0
3+
Compatible with Firmware Version 1.10.0 and python 3
4+
> Your milage may vary with other versions, it was tested against a device OS1-16
5+
> device running 1.10.0
56
67
## Installing
78
`pip install ouster-os1`
@@ -20,18 +21,19 @@ def handler(raw_packet):
2021
f.write("{}\n".format(','.join(coords)))
2122

2223

23-
os1 = OS1('10.0.0.3', '10.0.0.1') # OS1 sensor IP and destination IP
24+
os1 = OS1('10.0.0.3', '10.0.0.1', mode='1024x10') # OS1 sensor IP, destination IP, and resolution
2425
# Inform the sensor of the destination host and reintialize it
2526
os1.start()
2627
# Start the loop which will handle and dispatch each packet to the handler
2728
# function for processing
2829
os1.run_forever(handler)
2930
```
3031

31-
> You run the server as threaded with `os1.run_forever(handler, threaded=True)`
32+
> You can run the server as threaded with `os1.run_forever(handler, threaded=True)`
3233
3334
## Recipes
34-
Generally speed is a concern since the OS1 is sending 12,608 bytes/packet at a rate of 1280 packets/sec.
35+
Generally speed is a concern since the OS1 is sending 12,608 bytes/packet at a
36+
rate of 1280 packets/sec (in 1024x20 or 2048x10 mode).
3537
So a multiprocessing producer consumer model works well.
3638
```python
3739
import json
@@ -72,10 +74,29 @@ def spawn_workers(n, worker, *args, **kwargs):
7274

7375

7476
os1 = OS1(OS1_IP, HOST_IP)
75-
beam_intrinsics = json.loads(os1.api.get_beam_intrinsics())
77+
beam_intrinsics = json.loads(os1.get_beam_intrinsics())
7678
beam_alt_angles = beam_intrinsics['beam_altitude_angles']
7779
beam_az_angles = beam_intrinsics['beam_azimuth_angles']
78-
spawn_workers(4, worker, unprocessed_packets, beam_alt_angles, beam_az_angles)
80+
workers = spawn_workers(4, worker, unprocessed_packets, beam_alt_angles, beam_az_angles)
7981
os1.start()
80-
os1.run_forever(handler)
82+
try:
83+
os1.run_forever(handler)
84+
except KeyboardInterrupt:
85+
for w in workers:
86+
w.terminate()
8187
```
88+
89+
## TCP API Commands
90+
91+
The TCP API commands can be accessed through an instance of the `OS1` object.
92+
93+
The following methods are supported:
94+
95+
* `get_config_txt`
96+
* `get_sensor_info`
97+
* `get_beam_intrinsics`
98+
* `get_imu_intrinsics`
99+
* `get_lidar_intrinsics`
100+
* `get_config_param` - Supports querying active and staged parameters. Example: `os1.get_config_param('active', 'udp_ip')`
101+
* `set_config_param` - Supports settings parameters to be staged. Example: `os1.set_config_param('udp_ip', '10.0.0.1')`
102+
* `reinitialize` - Will reinitialize the sensor and apply all staged parameters to be active.

os1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
__author__ = "Ryan Siemens"
66
__email__ = "ryanjsiemens@gmail.com"
7-
__version__ = "1.0.1"
7+
__version__ = "1.1.0"
88
__license__ = "MIT"

0 commit comments

Comments
 (0)