RPLidar
The RPLidar A1/A2/S1 is a 2D laser scanner commonly used for SLAM and obstacle detection.
Wiring
| RPLidar Pin | Raspberry Pi |
|---|---|
| VCC (5V) | Pin 2 (5V) |
| GND | Pin 6 (GND) |
| TX | Pin 10 (RX) |
| RX | Pin 8 (TX) |
Or use the USB adapter that comes with the kit.
ROS 2 Driver
bash
sudo apt install ros-humble-rplidar-ros
ros2 launch rplidar_ros rplidar_a1_launch.pyVerify Topic
bash
ros2 topic echo /scanRVIZ Visualisation
Set Fixed Frame to laser and add a LaserScan display on topic /scan.
TIP
Set serial_port: /dev/ttyUSB0 in the launch file. Run ls /dev/tty* before and after plugging in to find the correct port.