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

port problems for not being root

asked 2012-01-30 20:40:51 -0600

apalomer gravatar image

updated 2012-01-31 02:20:38 -0600

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 merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2012-01-30 21:08:56 -0600

dornhege gravatar image

updated 2012-01-30 22:39:24 -0600

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 link more

Comments

if i ls - l /dev/ttyUSB* and the result is No such file or directory. and id-a gives : uid=1000(adelleodel) gid=1000(adelleodel) groups=1000(adelleodel),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare)what to do?

adelleodel gravatar image adelleodel  ( 2015-11-14 06:05:04 -0600 )edit

This is a different problem. Please open a new question and describe, what you are doing.

dornhege gravatar image dornhege  ( 2015-11-16 04:04:39 -0600 )edit
0

answered 2012-01-30 21:22:23 -0600

apalomer gravatar image

updated 2012-01-30 21:24:23 -0600

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 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 gravatar image dornhege  ( 2012-01-30 21:42:36 -0600 )edit
How can I do that?
apalomer gravatar image apalomer  ( 2012-01-30 22:32:08 -0600 )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 gravatar image dornhege  ( 2012-01-30 22:38:33 -0600 )edit
ok sorry i didn't saw it!
apalomer gravatar image apalomer  ( 2012-01-30 23:49:40 -0600 )edit
I just added that :)
dornhege gravatar image dornhege  ( 2012-01-30 23:50:49 -0600 )edit
0

answered 2012-01-31 00:04:30 -0600

apalomer gravatar image

updated 2012-02-02 22:13:18 -0600

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 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 gravatar image dornhege  ( 2012-01-31 00:25:58 -0600 )edit
How can i cheeck thoes values?
apalomer gravatar image apalomer  ( 2012-01-31 00:52:17 -0600 )edit
1
Try: udevadm info --name=ttyUSB0 --attribute-walk
dornhege gravatar image dornhege  ( 2012-01-31 01:06:03 -0600 )edit

Question Tools

Stats

Asked: 2012-01-30 20:40:51 -0600

Seen: 1,489 times

Last updated: Feb 02 '12