rs_driver is the driver kernel for the RoboSense LiDARs.
Please download the official release from github, or get the latest version with the git client tool.
git clone https://github.com/RoboSense-LiDAR/rs_driver.gitBelow are the supported LiDARS.
- RS-LiDAR-16
- RS-LiDAR-32
- RS-Bpearl
- RS-Helios
- RS-Helios-16P
- RS-Ruby-128
- RS-Ruby-80
- RS-Ruby-48
- RS-Ruby-Plus-128
- RS-Ruby-Plus-80
- RS-Ruby-Plus-48
- RS-LiDAR-M1
- RS-LiDAR-M2
- RS-LiDAR-M3
- RS-LiDAR-E1
- RS-LiDAR-MX
- RS-LiDAR-EMX
- RS-LiDAR-AIRY
- RS-LiDAR-FAIRY
rs_driver is supported on the following platforms and compilers. Note the compiler should support C++14.
-
Ubuntu (16.04, 18.04, 20.04, 22.04)
- gcc (4.8+)
-
Windows
- MSVC ( tested with Win10 / VS2019)
rs_driver depends on the following third-party libraries.
- libpcap (optional, needed to parse PCAP file)
- Eigen3 (optional, needed to use the internal transformation function)
- PCL (optional, needed to build the visualization tool)
- Boost (optional, needed to build the visualization tool)
sudo apt-get install libpcap-dev libeigen3-dev libboost-dev libpcl-devcd rs_driver
mkdir build && cd build
cmake .. && make -j4sudo make installIn your CMakeLists.txt, find the rs_driver package and link to it .
find_package(rs_driver REQUIRED)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(your_project ${rs_driver_LIBRARIES})Add rs_driver into your project as a submodule.
In your CMakeLists.txt, find the rs_driver package and link to it .
add_subdirectory(${PROJECT_SOURCE_DIR}/rs_driver)
find_package(rs_driver REQUIRED)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(your_project ${rs_driver_LIBRARIES})Install libpcap runtime library.
Unzip libpcap's developer's pack to your favorite location, and add the path to the folder WpdPack_4_1_2/WpdPack to the environment variable PATH .
To compile with VS2019, please use the official installation package PCL All-in-one installer.
Select the "Add PCL to the system PATH for xxx" option during the installation.

Installation is not supported on Windows.
rs_driver offers two demo programs in rs_driver/demo.
-
demo_online.cpp
demo_onlineconnects to online lidar, and output point cloud. -
demo_pcap.cpp
demo_pcapparses pcap file, and output point cloud. It is based on libpcap.
To build demo_online and demo_pcap, enable the CMake option COMPILE_DEMOS.
cmake -DCOMPILE_DEMOS=ON ..For more info about demo_online, Please refer to Decode online LiDAR
For more info about demo_pcap, Please refer to Decode pcap file
rs_driver offers a visualization tool rs_driver_viwer in rs_driver/tool , which is based on PCL.
To build it, enable the CMake option CMOPILE_TOOLS.
cmake -DCOMPILE_TOOLS=ON ..For more info about rs_driver_viewer, please refer to Visualization tool guide
For more info about the rs_driver API, Please refer to:
- Point Cloud message definition:
rs_driver/src/rs_driver/msg/point_cloud_msg.hpp,rs_driver/src/rs_driver/msg/pcl_point_cloud_msg.hpp - API definition:
rs_driver/src/rs_driver/api/lidar_driver.hpp - Parameters definition:
rs_driver/src/rs_driver/driver/driver_param.hpp, - Error code definition:
rs_driver/src/rs_driver/common/error_code.hpp
For more topics, Please refer to:
-
What is available in the rs_driver project? Include examples, tools, documents.
Please seeDirectories and Files
-
There are two versions of rs_driver:
v1.3.xandv1.5.x. Which is suggested? Is it suggested to upgrade tov1.5.x? How to upgrade?Please seeHow to port from v1.3.x to v1.5.x
-
How to compile rs_driver on Windows ?
Please seeHow to compile
rs_driveron Windows -
What is the interface of rs_driver like ? How to integrate it into my system?
Please seeThread Model and Interface
-
Is there any examples about how to integrate rs_driver ? And if mulitple LiDARs?
Please seeHow to connect to online LiDAR,How to decode PCAP file。
-
How to configure rs_driver's network options in unicast/multicast/broadcast mode? And if mulitple Lidars? With VLAN layer? May I add extra layers before/after MSOP/DIFOP packet? All configurations are OK, and Wireshark/tcpdump can capture the packets, but rs_driver still fails to get them. Why ?
Please seeOnline LiDAR - Advanced Topics
-
To decode a PCAP file with only one LiDAR data, how to configure
rs_driver? And if multiple LiDARs? With VLAN layer? With extra layers before/after MSOP/DIFOP packet?Please seePCAP File - Advanced Topics
-
Can I determine how to configure
rs_driverby a PCAP file? For both online LiDAR and PCAP file?Please seeHow to configure rs_driver by PCAP file
-
What format of PCAP file is supported by
rs_driver? How to capture such a file?Please seeHow to capture a PCAP file for rs_driver
-
How to compile demo apps/tools? How to avoid packet loss? How much is CPU usage? Point cloud is UTC time. How to convert it to loca time? How to disable PCAP file decoding on embedded Linux? How to enable point transformation?
Please seers_driver CMake Macros
-
How to specify Lidar type? How to specify data source (online LiDAR, PCAP file, user's data) ? How to timestamp point cloud with LiDAR clock or Host clock? How to discard NAN points in point cloud? Where does point cloud get its timestamp? from its first point, or last point? How to configure point transform? How to change the splitting angle of mechanical LiDAR?
Please seers_driver configuration parameters
-
rs_driver reports an error
ERRCODE_MSOPTIMEOUT/ERRCODE_WRONGMSOPID/ERRCODE_PKTBUFOVERFLOW...... What does it mean?Please seers_driver Error Code
-
How to transform point cloud to another position?
Please seeHow to transform point cloud
-
How much is data flow of RoboSense LiDARs ? When may it loss packets? How to avoid this?
Please seeHow to avoid packet Loss
-
How much CPU and memory does rs_driver need?
Please seeCPU Usage and Memory Usage of
rs_driver -
What is point layout like? What's the coordinate system of rs_driver? What is
ringof point? Where is point timestamp from?Please seePoint Layout in point cloud
-
How does RoboSense split frames? It uses the UDP protocol. What if packet loss or out of order?
Please seeSplitting frames
-
Want to know more implementation details about
rs_driver?Please seeAnalysis of rs_driver's source code