Ask Your Question
0

port problems for not being root

asked 2012-01-31 02:40:51 -0500

apalomer gravatar image

updated 2012-01-31 08:20:38 -0500

joq gravatar image

Hello,

I'm working with a xsense-mti with this node. I can run it perfectly as a root if i type: su, the pasword and then I go to the bin folder in the package and run ./mti_node

The thing is that when I try to run rosrun lse_xsens_mti mti_node I cannot connect to the port. How can I change it? If I can not run it as a normal user I can not launch it from a file with the rest of nodes I'm inerested!

Thanks.

edit retag flag offensive close delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2012-01-31 03:08:56 -0500

dornhege gravatar image

updated 2012-01-31 04:39:24 -0500

I think you are missing permissions on the device. The easiest might be to add yourself to the dialout group as in most cases that's where it is. Otherwise you need to setup udev rules.

What does ls -l /dev/ttyUSB* and id -a give you?

I use this udev rule for xsens:

# xsens FTDIs with product id d38b
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="d38b", SYMLINK+="sensors/ftdi_%s{serial}", MODE="0666", GROUP="dialout"
edit flag offensive delete publish link more
0

answered 2012-01-31 03:22:23 -0500

apalomer gravatar image

updated 2012-01-31 03:24:23 -0500

turtlebot@turtlebot2:~$ ls -l /dev/ttyUSB*
crw-rw-rw- 1 root turtlebot 188, 0 2012-01-31 11:22 /dev/ttyUSB0
crw-rw---- 1 root dialout   188, 1 2012-01-31 11:17 /dev/ttyUSB1
turtlebot@turtlebot2:~$ id -a
uid=1000(turtlebot) gid=1000(turtlebot) groups=27(sudo),44(video),1000(turtlebot)

obviously I don't have problems with ttyUSB0 when connected to the roomba, but I do have when I connect my xsense_mti to ttyUSB0, the same problem than in ttyUSB1.

edit flag offensive delete publish link more

Comments

Well, yes. Adding yourself to dialout should work in this case. Alternatively, you could make the /dev/ttyUSB1 also in the turtlebot group, ideally at the same spot, where this is configured for the roomba device (possibly udev?). dornhege ( 2012-01-31 03:42:36 -0500 )edit
How can I do that? apalomer ( 2012-01-31 04:32:08 -0500 )edit
I put my udev rule in my answer. You'd only need to change the group from dialout to turtlebot. In addition, you will have a /dev/sensors/ftdi_<serial#> for your xsens, independent if it's ttyUSB0 or 1. dornhege ( 2012-01-31 04:38:33 -0500 )edit
ok sorry i didn't saw it! apalomer ( 2012-01-31 05:49:40 -0500 )edit
I just added that :) dornhege ( 2012-01-31 05:50:49 -0500 )edit
0

answered 2012-01-31 06:04:30 -0500

apalomer gravatar image

updated 2012-02-03 04:13:18 -0500

I've created the rule:

# xsens FTDIs with product id 2303
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="xsens", MODE="0666", GROUP="turtlebot"

and saved in: /etc/udev/rules.d/xsense-usb.rules I've also restarted the computer but I still have the same problem. I can not change the serial port from /dev/ttyUSB1 to /dev/sensor/ftdi_<serial#> as it doesn't exist!

The last thing is that the other USB is also a ftdi chip doing the same transform but for a roomba.

edit flag offensive delete publish link more

Comments

Maybe the rule doesn't trigger for your device. The product id might be different. At least our xsens have the ones I gave. You'll need to check the real values of your device when you plug it. You can do the same with the other ftdi. dornhege ( 2012-01-31 06:25:58 -0500 )edit
How can i cheeck thoes values? apalomer ( 2012-01-31 06:52:17 -0500 )edit
1
Try: udevadm info --name=ttyUSB0 --attribute-walk dornhege ( 2012-01-31 07:06:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2012-01-31 02:40:51 -0500

Seen: 380 times

Last updated: Feb 03 '12