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

Hokuyo laser configuration

asked 2013-10-16 21:25:05 -0600

FuerteNewbie gravatar image

updated 2013-11-18 17:03:42 -0600

tfoote gravatar image

Hi guys,

I am currently using URG-04LX hokuyo laser and there is one problem that every time I power on this laser I need to reconfigure it all over again. Whenever I "ls -l /dev/ttyACM0", the feedback will always be crw-rw---- 1 root dialout 166, 0 Oct 17 15:10 /dev/ttyACM0

I was thinking could I possibly save the configuration(sudo chmod a+rw /dev/ttyACM0) or is there any launch code that would possibly do this job?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-10-16 23:25:05 -0600

dornhege gravatar image

Here is the more fancy udev solution that we use (needs the hokuyo_node package) and /etc/ros/

SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ATTRS{manufacturer}=="Hokuyo Data Flex for USB", ATTRS{product}=="URG-Series USB Driver", MODE="0666", GROUP="dialout", PROGRAM=="/etc/ros/ hokuyo_node getID %N q", SYMLINK+="sensors/hokuyo_%c"

Besides access rights this uses the getID util in hokuyo_node to provide device symlinks as /dev/sensors/hokuyo_SERIAL to enable identifying specific sensors neverminds which ttyACM they land at.

/etc/ros/ enables ROS

. /etc/ros/ 
rosrun $@

/etc/ros/ is a symlink to the in /opt/ros/DISTRO/

edit flag offensive delete link more


What is the different between your solution and the solution provided by @Tones ?

FuerteNewbie gravatar image FuerteNewbie  ( 2013-10-16 23:40:30 -0600 )edit

This one also provides device ids based on the serial number. Also it sets access rights for any user (other), not only dialout, but you can configure that.

dornhege gravatar image dornhege  ( 2013-10-17 00:44:56 -0600 )edit

answered 2013-10-16 22:12:48 -0600

Tones gravatar image

I would recommend adding your username to the group dialout:

sudo adduser $USER dialout
edit flag offensive delete link more


How does this make a difference? What is suppose to happen after I enter this command?

FuerteNewbie gravatar image FuerteNewbie  ( 2013-10-16 22:24:36 -0600 )edit

That is what you were asking for. It gives your user permanent access rights to this device so you don't have to "chmod" any more.

dornhege gravatar image dornhege  ( 2013-10-16 23:20:43 -0600 )edit

The idea behind the command is to add your user to the group, which has read/write access for `/dev/ttyACM0` by default instead of setting read/write access for all users every time again.

Tones gravatar image Tones  ( 2013-10-16 23:52:40 -0600 )edit

I can confirm that this has been THE way to solve access right issues for many sensors over here. It should be the preferred (simplest) solution for any /dev/tty* access issues.

autonomy gravatar image autonomy  ( 2013-10-22 04:11:24 -0600 )edit

Question Tools

1 follower


Asked: 2013-10-16 21:25:05 -0600

Seen: 555 times

Last updated: Oct 16 '13