Operate RPLidar A3 using ROS

Ans H. Qureshi
3 min readJan 17, 2022

--

RPLidar A3 is an omni-directional laser range scanner having a range of 25m radius developed by SLAMTEC. RPLidar has two modes of operation : Outdoor (20m range) and Enhanced mode (25 m range).

RPLidar A3

Luckily for Robot enthusiasts, SLAMTAC has provided an open-source ROS package that can be installed easily:

https://github.com/Slamtec/rplidar_ros

Clone this package to ROS catkin workspace src folder. For example, if your workspace name is catkin_ws then enter:

cd catkin_ws/src

git clone https://github.com/Slamtec/rplidar_ros

cd ..

Now source your workspace setup.bash file and build the packages:

source ~/catkin_ws/devel/setup.bash

catkin_make

Now connect the RPLIDAR A3 to your computer using USB connection.

Also, make sure that the proper baud rate is selected.

Confirm connectivity, the output must show the highlighted device.

lsusb output, red box indicates RPLidar A3

Now, run the view_rplidar_a3.launch file using following command:

roslaunch rplidar_ros view_rplidar_a3.launch

As soon as you run this command, logs will show up on your terminal and the lidar will start spinning.

An RViz panel will also launch showing the output of the Lidar. The output below shows the red colored boundary of the indoor environment with obstacles as well.

RViz display

You can also see the raw lidar data by echoing the /scan topic by running:

rostopic echo /scan

/scan topicraw data

RPLidar A3 can be used for gmapping and SLAM applications, all we need to do is provide the /scan topic that is published using this package and subscribe it to the mapping package file.

Bibliography:

--

--

Ans H. Qureshi
Ans H. Qureshi

Written by Ans H. Qureshi

0 Followers

CTO BrainSwarm | Researcher at the National Center of Robotics and Automation (NCRA), Pakistan.

No responses yet