|
|
@@ -40,10 +40,12 @@ $ pip install numpy
|
|
|
|
|
|
The project provides makefiles to simplify the compilation and build process:
|
|
|
|
|
|
-### Common command
|
|
|
-make # Compile .so Library.
|
|
|
-make clean # Clean build files.
|
|
|
-python3 rblidar.py # Test rblidar.py
|
|
|
+### Build
|
|
|
+First, build the .so library using `make`:
|
|
|
+
|
|
|
+```sh
|
|
|
+$ make
|
|
|
+```
|
|
|
|
|
|
### Troubleshooting
|
|
|
· Ensure all dependencies are installed
|
|
|
@@ -53,12 +55,12 @@ python3 rblidar.py # Test rblidar.py
|
|
|
### Usage example
|
|
|
|
|
|
```python
|
|
|
- from rblidar import RBLidar
|
|
|
+from rblidar import RBLidar
|
|
|
|
|
|
- def frame_callback(self, point_data_array):
|
|
|
- print(f"Received data, length: {len(point_data_array)}.")
|
|
|
+def frame_callback(self, point_data_array):
|
|
|
+ print(f"Received data, length: {len(point_data_array)}.")
|
|
|
|
|
|
- lidar = RBLidar("192.168.8.1", 2368, frame_callback=frame_callback)
|
|
|
+lidar = RBLidar("192.168.8.1", 2368, frame_callback=frame_callback)
|
|
|
```
|
|
|
|
|
|
|