EasyManua.ls Logo

RoboSense RS-LiDAR-M1 - Page 37

RoboSense RS-LiDAR-M1
54 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
·
RS-LiDAR-M1 User Guide
compilation can access some ROS features (excluding ROS2), but it requires users to
manually start roscore before the program starts, after the roscore starts, users need to
manually open rviz to view the visualized point cloud results.
The compilation commands are as follows:
$cd rslidar_sdk
$mkdir build && cd build
$cmake .. && make -j4
$./rslidar_sdk_node
B.2.1.2 Compilation Dependent on ROS-catkin
1. Open the CMakeLists.txt file in the project and change the set(COMPILE_METHOD
ORIGINAL) at the top of the file to set(COMPILE_METHOD CATKIN).
#=======================================
# Compile setup (ORIGINAL,CATKIN,COLCON)
#=======================================
set(COMPILE_METHOD CATKIN)
2. Rename the package_ros1.xml file in the rslidar_sdk project directory to package.xml.
3. Create a new folder as the workspace, then create a new folder named src, and put the
rslidar_sdk project into the src folder.
4. Return to the workspace directory, execute the following command to compile and run.
(if you use .zsh, replace the second command with source devel/setup.zsh)
$catkin_make
$source devel/setup.bash
$roslaunch rslidar_sdk start.launch
B.2.1.3 Compilation Dependent on ROS2-colcon
1. Open the CMakeLists.txt file in the project and change the set(COMPILE_METHOD
ORIGINAL)at the top of the file to set(COMPILE_METHOD COLCON)
#=======================================
# Compile setup (ORIGINAL,CATKIN,COLCON)
#=======================================
set(COMPILE_METHOD COLCON)
2. Rename the package_ros2.xml file in the rslidar_sdk project directory to package.xml.
3. Create a new folder as the workspace, then create a new folder named src, and put the
rslidar_sdk project into the src folder.
4. Download the LiDAR packet message definition in the ROS2 environment through the
link, and put the rslidar_msg project in the newly created src folder alongside the
rslidar_sdk.
5. Return to the workspace directory and execute the following command to compile and
run. (if you use .zsh, replace the second command with source install/setup.zsh)
$colcon build
$source install/setup.bash
$ros2 launch rslidar_sdk start.py