The RPlidar series from SLAMTEC is a compact distance measurement device using ToF (Time of Flight) technology. The devices are mainly used for long-range analyzes and allow the collection of information in a 360° horizontal plane. Thanks to their compactness, precision and low price, devices from this series can often be found in many robotics projects.
To run the device, you must meet certain requirements listed below:
- Connectivity: Serial Port/USB 2.0/Ethernet *
In this demo, we'll walk you through using the RPlidar devices with ROS 2 via a Docker image. You'll also learn how to visualize data, including laser scan, using RViz. Demo based on rplidar_ros repository.
1. Plugin the device
For optimal performance, please connect the device using the appropriate communication medium based on the lidar model.
2. Clone repository
git clone --branch ros2 https://github.com/husarion/rplidar-docker
3. Select the appropriate baudrate
<baudrate> with appropriate baudrate for your LiDAR from below table.
docker compose -f compose.rplidar.yaml up
docker compose -f compose.rviz.yaml up
The Laser Scan topic should appear in the RViz2 tool.
The full API of the robot can be found in the official documentation of the device.
RPlidar is a relatively small and cheap device that allows you to collect information about objects around you, which makes it an extremely useful device when mapping and navigating a robot. After completing this tutorial, you can easily integrate the LiDAR with your robot using Docker.
Do you need any support with completing this project or have any difficulties with software or hardware? Feel free to describe your thoughts on our community forum: https://community.husarion.com/ or to contact with our support: email@example.com