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

Permanently set permissions for /dev/ttyACM0 port using UDEV

asked 2016-01-13 05:54:55 -0600

schizzz8 gravatar image

Hi all,

I have an Hokuyo URG-04LX laser range finder and I'm using the hokuyo_node to read data from it. In order to use that ROS node, I have to set read-write permissions to the /dev/ttyACM0 port every time I plug in the laser. Searching on the web, I found that there is a way to store these permissions permanently using udev but unfortunately this procedure is not working for me.

This is what I get from lsusb:

Bus 002 Device 005: ID 15d1:0000

and, since I'm in the plugdev group

federico@HP-Compaq-8200:~$ groups
federico adm cdrom sudo dip plugdev lpadmin sambashare

I created a file named 70-hokuyo.rules in /etc/udev/rules.d/, with the following line:

federico@HP-Compaq-8200:~$ cat /etc/udev/rules.d/70-hokuyo.rules 
SUBSYSTEM=="usb", ATTRS{idVendor}=="15d1", ATTRS{idProduct}=="0000", GROUP="plugdev", MODE:="0666"

but when I plug in the laser, I get always the same result:

federico@HP-Compaq-8200:~$ ls -l /dev/ttyACM0 
crw-rw---- 1 root dialout 166, 0 gen 13 12:49 /dev/ttyACM0

Please, can someone tell me what I'm doing wrong?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2016-01-13 07:12:48 -0600

Akif gravatar image

updated 2016-01-13 07:14:51 -0600

This should be fine:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="15d1", ATTRS{idProduct}=="0000", MODE="0666", SYMLINK+="lidar_hokuyo"

This also adds a symlink as /dev/lidar_hokuyo so that you do not need to configure your port if it changes.

After you add this rule run:

sudo udevadm control --reload-rules && sudo service udev restart && sudo udevadm trigger

for changes to take effect.

edit flag offensive delete link more

Comments

Thanks! It worked! The GROUP variable was messing up things :)

schizzz8 gravatar image schizzz8  ( 2016-01-13 09:11:35 -0600 )edit

Glad it worked!

Akif gravatar image Akif  ( 2016-01-13 14:56:15 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-01-13 05:54:55 -0600

Seen: 9,893 times

Last updated: Jan 13 '16