Ask Your Question
0

roslaunch error , rplidar

asked 2017-01-28 02:03:17 -0500

sophie.shin gravatar image

From this part, I have several error.

When I input this,

 $ 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

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
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:54487/

SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.20
 * /rplidarNode/angle_compensate: True
 * /rplidarNode/frame_id: laser
 * /rplidarNode/inverted: False
 * /rplidarNode/serial_baudrate: 115200
 * /rplidarNode/serial_port: /dev/ttyUSB0

NODES
  /
    rplidarNode (rplidar_ros/rplidarNode)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
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].
log file: /home/ubuntu/.ros/log/687ff54e-e312-11e6-a5f7-0022cffa2d4b/rplidarNode-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-01-28 05:57:11 -0500

gvdhoorn gravatar image
 $ 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?

edit flag offensive delete link more

Comments

Thank you for your comment.

sophie.shin gravatar image sophie.shin  ( 2017-01-29 09:54:51 -0500 )edit

Do you have the rpilidar working now?

gvdhoorn gravatar image gvdhoorn  ( 2017-01-29 10:25:29 -0500 )edit

Thank you for your reply. I remove all and re-install and follow the installation guide step by step again.

There are various version regarding the USB port setting on the web post.. Finally I followed below,

$ ls /dev/ttyUSB*/
$ sudo chmod 666 /dev/ttyUSB0
sophie.shin gravatar image sophie.shin  ( 2017-01-29 10:47:16 -0500 )edit
1

The sudo chmod 666 .. will not be permanent. I'd advise you to look into udev rules.

gvdhoorn gravatar image gvdhoorn  ( 2017-01-29 10:55:21 -0500 )edit

hey gvdhoorn, I have the same issue here, and I wanted to know what the permanent fix would be? (I'm really new at this, so I'm still trying to learn all the basic terminology, please go easy on me)

razgrin gravatar image razgrin  ( 2017-03-29 21:03:10 -0500 )edit

As I wrote in my earlier comment: look into creating some suitable udev rules. Search for ros udev and you'll probably find some examples.

gvdhoorn gravatar image gvdhoorn  ( 2017-03-30 00:26:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-01-28 02:03:17 -0500

Seen: 6,107 times

Last updated: Jan 28 '17