Intro
9/7/25
- Update: See Adding Lidar for simplified LiDAR integration with ROS2 Humble
 
LiDAR Integration with ROS1
- https://wiki.ros.org/rplidar
 - LiDAR integration with ROS Noetic and Ubuntu on Raspberry Pi
- This tutorial will cover how to install ROS Noetic on the Ubuntu 20.04 LTS OS and LiDAR integration with Raspberry Pi 4.
 
 
LiDAR Integration with ROS2 Humble and Ubuntu 22.04 on Raspberry Pi
Connect RPLiDAR to Raspberry Pi
- Connect RPLiDAR to Raspberry Pi using Micro USB Cable.
- Flashing green light indicates normal activity of sensor
 
 - Check permissions of rplidar’s serial-port
 
ls -l /dev |grep ttyUSB- output should look similar to:
 
crw-rw----  1 root   dialout 188,   0 Jan  3 14:59 ttyUSB - Add write authority: (such as /dev/ttyUSB0)
 
sudo chmod 666 /dev/ttyUSB0Create Workspace
- source ROS2 environment (main ROS2 installation as underlay)
 
source /opt/ros/humble/setup.bash- create directory and cd into src folder
 
mkdir -p rplidar_ros2/src
cd rplidar_ros2/srcInstall RPLIDAR ROS Package
- Clone repo into the workspace 
srcfolder 
git clone https://github.com/babakhani/rplidar_ros2- Build the package
 
cd rplidar_ros2
colcon build --symlink-install --parallel-workers 2- Source the environment
 
source install/setup.bash- Check if RPLidar package is found in installed ROS2 package list
 
ros2 pkg list | grep rplidar- Output:
 
rplidar_rosRun rplidar_ros2
- Start a rplidar node using launch file and view scan result in rviz
- Rviz will open with a map of the RPLIDAR’s surroundings.
 - The laser scanner has a range of roughly 15cm to 6 meters, so you’ll be able to see everything around it on its scanning plane within that range.
 
 
ros2 launch rplidar_ros view_rplidar.launch.py




