2018/04/06:Low-cost LIDARs!(3) ROS package

ROS compatibility

RPLIDAR A2 and Sweep have their respective SDKs released, which is possible to use data from our own software. However, if you are using it for a robot, no reason not to use ROS. Here we will look at the ROS compatibility.

In both RPLIDAR and Sweep, the ROS driver code has already been created.

Sweep has not been released yet, so it needs build from source.

RPLIDAR has already been released, it can be installed with apt comand

$ sudo apt install ros-kinetic-rplidar-ros

Activation of sensor

Both can easily retrieve the data with the included launch file and see it with rviz.

RPLIDAR A2:

$ roslaunch rplidar_ros view_rplidar.launch

Sweep:

$ roslaunch sweep_ros view_sweep_pc2.launch

Differences in messages

rolidar_ros outputs the sensor_msgs / LaserScan message.

Sweep_ros, on the other hand , outputs sensor_msgs / PointCloud 2 . This is probably because Sweep’s measurement is not synchronized with rotation, as mentioned before. However, by using scan_tools / pointcloud_to_laserscan , PointCloud2 messages can be converted to LaserScan messages.

Displayed in Rviz

I tried visualizing data in the same place.

RPLIDAR A2(10Hz)

RPLIDAR A2 is the default setting and you can understand the shape of the room. We also confirmed that it can be used enough for map generation and autonomous movement of robots .

Sweep rotating at the same 10 Hz in the default state is here.

Sweep(10Hz, sample_rate=500Hz)

Well, after all, at the same speed, the roughness of Sweep stands out. But it seems to me that the resolution is too low.

I noticed that the default sample rate of the sweep_ros node was half of the maximum specification (1 kHz) at 500 Hz . I would like to have the maximum performance by default, but we can set sample_rate parameter to 1000 and tried again.

Sweep (10Hz, sample_rate=1kHz)

The detail level has improved much. However, compared to RPLIDAR A2, the shape of the room is hard to understand.

Continue trying to lower the scan (rotating) speed to 3 Hz.

Sweep (3Hz, sample_rate=1kHz)

I can understand the shape of the room this time. The renewal cycle is about three times longer than RPLIDAR A2, as the rotation speed has decreased.

Next, let’s compare the data with the video.