Skip to content

Software

rplidar_driver (lifecycle RPLIDAR driver)

From github.com/frozenreboot/rplidar_driver (opens in a new tab)

  • Perception
  • Driver or SDK
  • BSD-2-Clause

A fault-tolerant ROS 2 driver for Slamtec RPLIDAR laser scanners, built on a lifecycle state machine so the robot keeps running through disconnections and permission failures.

Facts

GitHub stars
49read on 29 Nov 2026
Last update
5 Oct 2026Newest commit on main
Maintenance
Activea commit in the last 90 days
Difficulty
Beginner

Checked on GitHub on 29 Nov 2026.

Licenses

Code
BSD-2-Clause (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (BSD-2-Clause) at commit 4446f8f (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Reconnects automatically after hot-plug or USB disconnection through the lifecycle state machine.
  • Reports permission failures explicitly through diagnostics instead of failing silently.
  • Allows runtime changes to motor RPM and scan mode without restarting the node.
  • Offers standby services to park the motor while keeping the connection and publishers active.
  • Can stop the motor automatically when nothing subscribes to the scan or point cloud topics.
  • Supports composition as an rclcpp_components node and separates ROS logic from the vendor SDK via an interface layer.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
BSD-2-Clause. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's website (opens in a new tab)
Maintenance
Active, last commit on 5 Oct 2026.

Use it

How to install it, in the creator's words: The project's website (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 4446f8f

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by @frozenreboot, at commit 4446f8f, under BSD-2-Clause (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

🛡️ Robust RPLIDAR ROS 2 Driver

(opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab) (opens in a new tab)

"Because the official driver shouldn't crash just because you pulled the plug."

A fault-tolerant ROS 2 driver for Slamtec RPLIDAR, built around a Lifecycle State Machine and a thread-safe architecture. Your robot keeps running even under hardware disconnection or permission failures.


⚡ Why Use This?

Most existing RPLIDAR drivers assume the hardware never misbehaves. This driver assumes the opposite. Compared to the reference implementation:

CapabilityReference DriverThis Driver
Hot-plug recoveryNot handled✅ Auto-reconnect via lifecycle FSM
Permission failure reportingSilent failure✅ Explicit diagnostics
Runtime reconfigurationRestart required✅ Live RPM / scan-mode update
Component compositionStandalone only✅ rclcpp_components support
SDK couplingDirect calls throughout✅ Interface-based abstraction layer

🚀 Getting Started
Option A — Binary install (coming soon)

This package has been submitted to the ROS 2 build farm. Once it syncs, you will be able to install it directly:

sudo apt install ros-${ROS_DISTRO}-rplidar-driver

Supported distros: Humble, Jazzy, Lyrical, and Rolling.

Option B — Build from source
cd ~/ros2_ws/src
git clone https://github.com/frozenreboot/rplidar_driver.git
cd ..

# Install dependencies
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -r -y

# Build the workspace
colcon build --symlink-install
Quick Launch
ros2 launch rplidar_driver rplidar.launch.py serial_port:=/dev/ttyUSB0
Dynamic Reconfigure (Runtime)

You can change the motor speed without killing the node:

ros2 param set /rplidar_node rpm 1000
ros2 param set /rplidar_node scan_mode DenseBoost
Standby (Motor Control)

Park the motor without leaving the ACTIVE state. The serial connection, the scan thread and the publishers all stay up, so waking costs only the motor spin-up time:

ros2 service call /stop_motor std_srvs/srv/Trigger
ros2 service call /start_motor std_srvs/srv/Trigger

Or let the driver follow demand. With auto_standby the motor stops while nobody subscribes to scan (or to cloud, when publish_point_cloud is enabled) and restarts as soon as somebody does:

ros2 param set /rplidar_node auto_standby true

While auto_standby is enabled the two services are rejected, so the subscriber count stays the single source of truth.

Toggling the parameter hands the motor over, and the new owner decides from scratch: a pending stop_motor standby is dropped, and switching back off leaves the motor running.

Diagnostics say why the motor is idle, which is usually the question:

ros2 topic echo /diagnostics    # "Standby (auto: no subscribers)" vs "Standby (motor off)"

🧪 Call for Experiments: "Does it survive?"

We need your help to validate this driver on various robots! If you use this driver, please stress-test it (e.g., unplug USB while scanning, change RPM dynamically) and share your results.

📢 How to Submit a Report

Please open an issue with the title [Experiment] Your_Robot_Name and include:

  1. Lidar Model: (e.g., A1, A2, S1...)
  2. Recovery Log: (Copy paste the terminal output when you unplug/replug)
  3. Screenshot: rqt_graph or rviz2

👉 Submit your Experiment Report Here (opens in a new tab)


🏗️ Architecture

This driver uses a 3-Layer Design to decouple ROS 2 logic from the vendor SDK.

  • Node Layer: Handles Lifecycle & Parameters.
  • Wrapper Layer: Handles Threading & Mutex.
  • SDK Layer: Raw data fetching.

Architecture Diagram


👥 Maintainers

Based on the original work by RoboPeak & Slamtec.


🤖 AI-Assisted Development Disclosure

In compliance with the OSRF Policy on the Use of Generative AI in Contributions (opens in a new tab) (Effective May 2025), we explicitly disclose the use of Generative AI tools in the development of this driver.

  • Tools Used:
    • Anthropic Claude: Release engineering support, refactoring suggestions, and documentation.
    • Google Gemini: Boilerplate code generation and test infrastructure scaffolding.
    • OpenAI ChatGPT: Refactoring suggestions and documentation formatting.
  • Verification:
    • All AI-generated content has been manually reviewed, tested, and verified by the maintainers.
    • The logic, memory safety, and ROS 2 lifecycle state transitions have been rigorously checked to ensure system stability.
  • Note:
    • Contributions follow the Generated-by: tag convention in commit messages as per the OSRF guidelines.

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.