Ask Your Question
0

How to use a terminal command line in a launch file

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

Bert gravatar image

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

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
1

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

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

Comments

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

gvdhoorn gravatar imagegvdhoorn ( 2016-03-10 08:52:50 -0600 )edit

Thanks!

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

Bert gravatar imageBert ( 2016-03-10 09:31:59 -0600 )edit

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

gvdhoorn gravatar imagegvdhoorn ( 2016-03-10 10:31:55 -0600 )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

Stats

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

Seen: 81 times

Last updated: Mar 10 '16