Skip to content

wyca-robotics/rs_driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rs_driver

1 工程简介

rs_driver为速腾聚创雷达驱动内核。支持RS-LiDAR-16, RS-LiDAR-32, RS-Bpearl, RS-128RS-80的点云数据解析,方便用户二次开发使用。

2 依赖介绍

  • Boost
  • pthread
  • pcap

Boost 与 pthread 均为系统库,可直接链接使用。

Pcap则需使用以下指令安装:

sudo apt-get install -y  libpcap-dev

3 使用方式

3.1 安装使用

首先安装驱动

cd rs_driver
mkdir build && cd build
cmake .. && make -j4
sudo make install

使用时,需要在CMakeLists文件中链接雷达驱动

find_package(rs_driver REQUIRED)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(project ${rs_driver_LIBRARIES})

3.2 嵌入使用

直接将rs_driver放入用户工程内,在CMakeLists中链接即可

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/rs_driver/cmake)
include(rs_driver)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(project ${rs_driver_LIBRARIES})

4 示例程序

rs_driver提供了两个示例程序,存放于rs_driver/demo中:

  • demo_online.cpp
  • demo_pcap.cpp

若希望编译这两个示例程序,需要将CMakeLists文件内的COMPILE_DEMOS设置为TRUE(默认为FALSE)。

#=============================
#  Compile Demos (TRUE/FALSE)
#=============================
set(COMPILE_DEMOS TRUE)

用户可参考示例程序,编写自己的代码调用雷达驱动。

5 快速上手

在线连接雷达

离线解析pcap包

6 其他资料

参数简介

消息简介

异常简介

接口简介


1 Introduction

rs_driver is the driver code for RoboSense LiDAR, include RS-LiDAR-16, RS-LiDAR-32, RS-Bpearl , RS-128 and RS-80 . It can be used to extract packets from lidar to point cloud, and it is convenient for users to do advanced development.

2 Dependency

  • Boost
  • pthread
  • pcap

Boost and pthread are libraries of system, that can be linked directly.

Pcap need to be installed as follow:

sudo apt-get install -y  libpcap-dev

3 Usage

3.1 Install driver to use

Install the driver.

cd rs_driver
mkdir build && cd build
cmake .. && make -j4
sudo make install

Then find the driver package and link it in the project CMakeLists.

find_package(rs_driver REQUIRED)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(project ${rs_driver_LIBRARIES})

3.2 Embed driver in project

Put the rs_driver in the project and link it in the CMakeLists.

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/rs_driver/cmake)
include(rs_driver)
include_directories(${rs_driver_INCLUDE_DIRS})
target_link_libraries(project ${rs_driver_LIBRARIES})

4 Demo Code

rs_driver supply two demo programs which are stored inrs_driver/demo

  • demo_online.cpp
  • demo_pcap.cpp

User need to set the COMPILE_DEMOS in CMakeLists to TRUE to compile these two programs( the default value is FALSE).

#=============================
#  Compile Demos (TRUE/FALSE)
#=============================
set(COMPILE_DEMOS TRUE)

User can refer to the demo code to use rs_driver api.

5 Quick Start

Online connect LiDAR

Offline decode pcap bag

6 Others

Intro to parameters

Intro to message types

Intro to error codes

Intro to api

About

RoboSense LiDAR driver kernel code

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 95.8%
  • CMake 4.1%
  • C 0.1%