Python module for RPLidar A1 and A2 rangefinder scanners
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Doc changes Apr 15, 2016
examples Added execution permissions Apr 6, 2017
.gitignore Initial commit Apr 15, 2016
LICENSE First commit Apr 15, 2016 Updated readme and docs Apr 6, 2017 Update DTR commands (#5) May 13, 2017 Added execution permissions Apr 6, 2017

RPLidar Documentation PyPI MIT License

Simple and lightweight Python module for working with RPLidar rangefinder scanners.

This module aims to implement communication protocol with RPLidar rangefinder scaners. It's Python 2 and 3 compatible, but was mainly tested using Python 3.

For protocol specifications please refer to the slamtec document.


You can install rplidar using pip:

$ pip install rplidar

Or for Python 3:

$ sudo pip3 install rplidar


View the latest rplidar documentation at

Usage example

Simple example:

from rplidar import RPLidar
lidar = RPLidar('/dev/ttyUSB0')

info = lidar.get_info()

health = lidar.get_health()

for i, scan in enumerate(lidar.iter_scans()):
    print('%d: Got %d measurments' % (i, len(scan)))
    if i > 10:


In addition to it you can view example applications inside examples directory.