rs_driver is cross-platform driver kernel for RoboSense LiDAR which is easy for users to do advanced development.
- RS16
- RS32
- RSBP
- RS128
- RS80
- RSM1-B3
- RSHELIOS
rs_driver is compatible with the following platforms and compilers:
- Windows
- MSVC ( tested with VC2017 and VC2019)
- Mingw-w64 (tested with x86_64-8.1.0-posix-seh-rt_v6-rev0 )
- Ubuntu (16.04, 18.04)
- gcc (4.8+)
rs_driver depends on the following third-party libraries. They must be compiled/installed properly in advance:
- Boost
- pcap
- PCL (optional, only needed if build the visualization tool)
- Eigen3 (optional, only needed if use the internal transformation function)
sudo apt-get install libboost-dev libpcap-dev libpcl-dev libeigen3-dev
In Windows, Boost needs compiling from source, please refer to the official guide for detailed instructions.
Once finishing installing Boost, add a system environment variable named BOOST_ROOT
which is set to your Boost path.
If using MSVC as your compiler, these pre-built binary installers may save you some time.
Firstly, install pcap runtime.
Then, download pcap's developer's pack to your favorite location and add the path to WpdPack_4_1_2/WpdPack
folder to the Path
environment variable.
Note: you can skip installing PCL if you don't want to compile visualization tool.
(1) MSVC
Please use the provided official All-in-one installer.
Select the "Add PCL to the system PATH for xxx" option during installation.
(2) Mingw-w64
Since there'are no installers for mingw-w64 compiler available, PCL needs to be compiled out from source as instructed in this tutorial.
Note: installation is not supported in Windows.
Install the driver.
cd rs_driver
mkdir build && cd build
cmake .. && make -j4
sudo make install
Then find rs_driver package and link to it in your CMakeLists.txt
.
find_package(rs_driver REQUIRED)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(project ${rs_driver_LIBRARIES})
Add rs_driver as your project's submodule, then find rs_driver package and link to it in your CMakeLists.txt
.
add_subdirectory(${PROJECT_SOURCE_DIR}/rs_driver)
find_package(rs_driver REQUIRED)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(project ${rs_driver_LIBRARIES})
rs_driver offers two demo programs in rs_driver/demo
:
- demo_online.cpp
- demo_pcap.cpp
User can refer to the demo code for usage of api. To build demo programs, set the following option to ON
when configuring using cmake:
cmake -DCOMPILE_DEMOS=ON ..
rs_driver offer a visualization tool based on PCL in rs_driver/tool
:
- rs_driver_viewer.cpp
To build it, set the following option to ON
when configuring using cmake:
cmake -DCOMPILE_TOOLS=ON ..
For basic usage of this tool, please refer to Visualization tool guide
rs_driver has the coordinate transformation function built inside and it can output the transformed point cloud directly, which can save the extra time cost of doing transformation after receiving point clouds from rs_driver. To enable this function, set the following option to ON
when executing cmake command:
cmake -DENABLE_TRANSFORM=ON ..
For more details about the tool, please refer to Transformation guide
Please refer to the following files for more infomation.
- Parameters definition:
rs_driver/src/rs_driver/driver/driver_param.h
- Point Cloud message definition:
rs_driver/src/rs_driver/msg/point_cloud_msg.h
- API definition:
rs_driver/src/rs_driver/api/lidar_driver.h
- Error code definition:
rs_driver/src/rs_driver/common/error_code.h
Multi-Cast function: Multi-Cast