|
|
@@ -40,24 +40,25 @@ $ pip install numpy
|
|
|
|
|
|
The project provides makefiles to simplify the compilation and build process:
|
|
|
|
|
|
-# Common command
|
|
|
+### Common command
|
|
|
make # Compile .so Library.
|
|
|
make clean # Clean build files.
|
|
|
python3 rblidar.py # Test rblidar.py
|
|
|
|
|
|
-## Troubleshooting
|
|
|
+### Troubleshooting
|
|
|
· Ensure all dependencies are installed
|
|
|
· Check library path and permissions
|
|
|
· Verify network configuration for UDP communication
|
|
|
|
|
|
-## Usage example
|
|
|
+### Usage example
|
|
|
|
|
|
-from rblidar import RBLidar
|
|
|
+```python
|
|
|
+ from rblidar import RBLidar
|
|
|
|
|
|
-def data_callback(data, length):
|
|
|
- print(f"Received data, length: {length}")
|
|
|
-
|
|
|
-lidar = RBLidar("192.168.8.1", 2368, frame_callback=data_callback)
|
|
|
+ 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)
|
|
|
+```
|
|
|
|
|
|
|