0
$\begingroup$

Rosanswers logo

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!


Originally posted by schizzz8 on ROS Answers with karma: 183 on 2016-01-13

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Akif with karma: 3561 on 2016-01-13

This answer was ACCEPTED on the original site

Post score: 5


Original comments

Comment by schizzz8 on 2016-01-13:
Thanks! It worked! The GROUP variable was messing up things :)

Comment by Akif on 2016-01-13:
Glad it worked!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.