LiDAR Operations
Launch the LiDAR node
Start the RPLIDAR driver and publish LaserScan data.
Follow these steps to start the RPLIDAR sensor, which publishes sensor_msgs/msg/LaserScan messages on the /scan topic.
cd ~/repos/common_platform/common_platform_ws
source install/setup.bash
ros2 launch sensors rplidar.launch.py
Verify LiDAR topics
Check that the LiDAR node is publishing data on the expected topics.
After launching the LiDAR driver you should ensure that the expected topics are active and messages are flowing. The following commands display LaserScan messages and report message frequency.
ros2 topic echo /${ROS_NAME}/scan
ros2 topic hz /${ROS_NAME}/scan
ros2 topic list
Diagnose and calibrate the LiDAR
Perform hardware checks, run the standalone node and control the motor.
If the LiDAR isn’t publishing data as expected, run these diagnostics. They help verify USB connectivity, access the device directly, and control the sensor’s motor via services.
lsusb | grep -i lidar
ls /dev/tty*
If the driver cannot connect via the rplidar.launch.py file, try running the node directly with an explicit serial port:
ros2 run rplidar_ros rplidar_node --ros-args -p serial_port:=/dev/ttyUSB0
ros2 service call /${ROS_NAME}/stop_motor std_srvs/srv/Empty "{}"
ros2 service call /${ROS_NAME}/start_motor std_srvs/srv/Empty "{}"
To adjust scanning parameters like range_min, range_max or scan_time, edit the rplidar.launch.py or pass parameters via --ros-args -p. Refer to the driver documentation for recommended values.