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

How to use a terminal command line in a launch file

asked 2016-03-10 07:50:19 -0500

Bert gravatar image

updated 2016-03-10 08:35:38 -0500

I am currently using Hector mapping with a hokuyo laser scanner. In the launch file of Hector mapping, I added the hokuyo_node for the laserscanner and I also start RVIZ. But I still need to configure the hokuyo lasserscanner everytime manually in the terminal with this code before starting: sudo chmod a+rw /dev/ttyACM0

Is there a way to include this in my launch file?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-10 08:48:07 -0500

alee gravatar image

I'm pretty sure roslaunch can't handle this because it's simply XML tags (please correct me if I'm wrong) but you should definitely look into setting udev rules for your laser scanner. This means that whenever it's plugged in, the computer will automatically give it proper permissions.

edit flag offensive delete link more


@alee is right. See the linked questions in the answer to Rosrun as super user.

gvdhoorn gravatar image gvdhoorn  ( 2016-03-10 08:52:50 -0500 )edit


I used this command and my problem is solved: sudo adduser myusername dialout

Bert gravatar image Bert  ( 2016-03-10 09:31:59 -0500 )edit

@Bert: please accept @alee's answer by ticking the checkmark to the left of it.

gvdhoorn gravatar image gvdhoorn  ( 2016-03-10 10:31:55 -0500 )edit

Question Tools


Asked: 2016-03-10 07:50:19 -0500

Seen: 400 times

Last updated: Mar 10 '16