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

Revision history [back]

click to hide/show revision 1
initial version
 $ roslaunch rplidar_ros rplidar.launch

it shows

[rplidar.launch] is neither a launch file in package [rplidar_ros] nor is [rplidar_ros] a launch file name
The traceback for the exception was written to the log file

This is completely expected: you appear to not have sourced the correct setup.bash file from the workspace that contains the rpilidar_ros package. Without the information from the setup.bash, ROS cannot find that package, hence the error message.

And I'm slightly confused, as you seem to know that already, seeing as you source /home/ubuntu/catkin_ws/devel/setup.bash two lines later.

However, if I input

ubuntu@ubuntu:~/catkin_ws$ source /home/ubuntu/catkin_ws/devel/setup.bash
ubuntu@ubuntu:~/catkin_ws$ roslaunch rplidar_ros rplidar.launch
... logging to /home/ubuntu/.ros/log/687ff54e-e312-11e6-a5f7-0022cffa2d4b/roslaunch-ubuntu-7014.log
[..]
process[rplidarNode-1]: started with pid [7032]
RPLIDAR running on ROS package rplidar_ros
SDK Version: 1.5.7
Error, cannot bind to the specified serial port /dev/ttyUSB0.
[rplidarNode-1] process has died [pid 7032, exit code 255, cmd /home/ubuntu/catkin_ws/devel/lib/rplidar_ros/rplidarNode __name:=rplidarNode __log:=/home/ubuntu/.ros/log/687ff54e-e312-11e6-a5f7-0022cffa2d4b/rplidarNode-1.log].
[..]

This looks like a problem with the serial port that you are telling rpilidar_ros to use.

Are you sure that you have a ttyUSB0, and that the lidar is connected to that port? Have you also made sure your user ubuntu has read and write access to the serial port?