RPLIDAR A1 — LIDAR Container
ROS 2 container for the Slamtec RPLIDAR A1, using the upstream sllidar_ros2 driver cloned at build time.
Architecture
┌──────────────────────────────────────┐
│ sllidar_ros2 (rplidar_node) │
│ │
│ serial 115200 baud │
│ angle_compensate = true │
│ ▼ │
│ /dev/ttyUSB0 ──────> RPLIDAR A1 │
│ │
/scan <───────│ LaserScan @ ~10 Hz │
(sensor_msgs/ │ 360° scan, range 0.15–12 m │
LaserScan) │ │
└──────────────────────────────────────┘
How the build works
The Dockerfile clones the upstream driver from GitHub at build time:
git clone https://github.com/Slamtec/sllidar_ros2.git
colcon build --packages-select sllidar_ros2
To pin to a specific branch or tag, pass SLLIDAR_REF as a build arg:
docker compose build --build-arg SLLIDAR_REF=v2.0.0 lidar
Published topics
| Topic | Type | Description |
|---|---|---|
/scan |
sensor_msgs/LaserScan |
360° laser scan |
Device
The RPLIDAR A1 connects via USB serial at /dev/ttyUSB0 (default), 115200 baud.
The container receives access to that device via the devices mapping in
docker-compose.yml. To use a different port, set
LIDAR_PORT in your .env file:
LIDAR_PORT=/dev/ttyUSB1