ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I guess you didn't change the port in rplidar.launch.

<launch> <node name="rplidarNode" pkg="rplidar_ros" type="rplidarNode" output="screen">
</node> </launch>

You should use ls /dev/ttyUSB* to check what's the port of your lidar. Also, make sure your user is in the linux group dialout to get access to the lidar.

I guess you didn't change the port in rplidar.launch.

<launch>
  <node name="rplidarNode"  pkg="rplidar_ros"  type="rplidarNode" output="screen">
  <param name="serial_port"  
type="string" value="/dev/ttyUSB0"/> <param name="serial_baudrate" type="int" value="115200"/> <param name="frame_id" type="string" value="laser"/> <param name="inverted" type="bool" value="false"/> <param name="angle_compensate" type="bool" value="true"/> </node> </launch>

</launch>

You should use ls /dev/ttyUSB* to check what's the port of your lidar. Also, And make sure the line below is correct.

<param name="serial_port"         type="string" value="/dev/ttyUSB0"/>

Also, check if your user is in the linux group dialout dialout to get access to the lidar.

I guess you didn't change the port in rplidar.launch.

<launch>
  <node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen">
  <param name="serial_port"         type="string" value="/dev/ttyUSB0"/>  
  <param name="serial_baudrate"     type="int"    value="115200"/>
  <param name="frame_id"            type="string" value="laser"/>
  <param name="inverted"            type="bool"   value="false"/>
  <param name="angle_compensate"    type="bool"   value="true"/>
  </node>
</launch>

You should use ls /dev/ttyUSB* to check what's the port of your lidar. And make sure the line below is correct.

<param name="serial_port"         type="string" value="/dev/ttyUSB0"/>

Also, check if your user is in the linux group dialout to get access to the lidar.

============================================================

Update:

I think you should first take a look at the message in your /scan topic to confirm if angle_min != -angle_max. http://docs.ros.org/api/sensor_msgs/html/msg/LaserScan.html

Although in http://geduino.blogspot.com.tr/2015/04/gmapping-and-rplidar.html, it mentioned that

First issue regards the LaserScan expected by GMapping. Unfortunately this is not documented anywhere and I found it only checking out source code: on latest commits (not yet released) a new check was added to make sure LaserScan message min angle and max angle are opposite:

maxAngle = - minAngle

This condition is not satisfied by RPLidar node but, since released version of GMapping does not include this check, is not easy to notice.

I guess your gmapping does include this check, and since the driver didn't handle this issue, your gmapping console would complain about that.

You might need to modify the rplidar_ros/src/node.cpp to let angle_min == -angle_max and see if it works.