Download Print this page

Unitree Unilidar SDK User Manual page 5

Lidar

Advertisement

·Build
You can build this program as a cmake project:
```
cd unitree_lidar_sdk
mkdir build
cd build
cmake .. && make -j2
```
'mkdir build' is used to create a folder named "build" for storing the compiled files;
'cd build' is used to enter the "build" folder;
'cmake ..' is used to generate the Makefile;
'make -j2' is used to compile and generate the executable file.
During the compilation process, -j2 indicates that 2 threads are used for the compi-
lation, which can speed up the compilation process. If your computer has more pro-
cessor cores, you can adjust this parameter accordingly.
·Run
Directly run the example:
```
../bin/example_lidar
```
The output is like this:
```
$ ../bin/example_lidar
lidar firmware version = 0.3.2+230511
lidar sdk version = 1.0.3
Dirty Percentage = 5.145833 %
Dirty Percentage = 4.166667 %
Dirty Percentage = 4.166667 %
Turn on all the LED lights ...
Turn off all the LED lights ...
Set LED mode to: FORWARD_SLOW ...
Set LED mode to: REVERSE_SLOW ...
Set LED mode to: SIXSTAGE_BREATHING ...
Set Lidar working mode to: NORMAL_MODE ...
2023 Unitree Robotics. All rights reserved.
4

Advertisement

loading
Need help?

Need help?

Do you have a question about the Unilidar SDK and is the answer not in the manual?