ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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

2 Answers

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
0

answered 2021-09-26 21:01:46 -0500

tnkumar gravatar image

updated 2021-09-26 21:04:30 -0500

I am facing a similar problem, where I am not able to see /dev/ttyUSB0 on my RPi4 When I do ls /dev/tty* - I see many devices but not /dev/ttyUSB0 My RPLIDAR is connected to the USB port and is rotating

root@2a69a7970f29:~/catkin_ws# ls /dev/tty* /dev/tty /dev/tty12 /dev/tty17 /dev/tty21 /dev/tty26 /dev/tty30 /dev/tty35 /dev/tty4 /dev/tty44 /dev/tty49 /dev/tty53 /dev/tty58 /dev/tty62 /dev/ttyAMA0 /dev/tty0 /dev/tty13 /dev/tty18 /dev/tty22 /dev/tty27 /dev/tty31 /dev/tty36 /dev/tty40 /dev/tty45 /dev/tty5 /dev/tty54 /dev/tty59 /dev/tty63 /dev/ttyS0 /dev/tty1 /dev/tty14 /dev/tty19 /dev/tty23 /dev/tty28 /dev/tty32 /dev/tty37 /dev/tty41 /dev/tty46 /dev/tty50 /dev/tty55 /dev/tty6 /dev/tty7 /dev/ttyprintk /dev/tty10 /dev/tty15 /dev/tty2 /dev/tty24 /dev/tty29 /dev/tty33 /dev/tty38 /dev/tty42 /dev/tty47 /dev/tty51 /dev/tty56 /dev/tty60 /dev/tty8 /dev/tty11 /dev/tty16 /dev/tty20 /dev/tty25 /dev/tty3 /dev/tty34 /dev/tty39 /dev/tty43 /dev/tty48 /dev/tty52 /dev/tty57 /dev/tty61 /dev/tty9

edit flag offensive delete link more

Comments

1

This does not appear to be an answer, but a question/comment. Could you please only post answers when you're answering a question?

gvdhoorn gravatar image gvdhoorn  ( 2021-09-27 01:36:57 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 9,786 times

Last updated: Sep 26 '21