[ros-users] ROS driver supporting Sparkfun IMU
Patrick Goebel
patrick at pirobot.org
Tue May 3 00:33:39 UTC 2011
This is an old thread that also pertains to creating udev rules for
various plug and play devices, particularly USB. Everything has been
working nicely for a few months under Ubuntu 10.04 but today for the
first time I tried to set up a pair of udev rules for two devices of the
same type that differ only in their serial numbers
The two devices are a pair of USB2Dynamixel controllers and the rules I
tried are:
# The USB2Dynamixel on Pi Robot controlling AX-12 servos
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{manufacturer}=="FTDI",
ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A1001a6n",
SYMLINK+="usb2dynamixel12"
# The other USB2Dynamixel on Pi Robot controlling RX-24 servos
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{manufacturer}=="FTDI",
ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A600cB3f",
SYMLINK+="usb2dynamixel24"
The trouble is that whenever I plug in either controller, *both* devices
get created (/dev/usb2dynamixel12 and /dev/usb2dynamixel24) and they
both point to the same /dev/ttyUSB device which is /dev/ttyUSB0 if only
one controller is plugged in and /dev/ttyUSB1 if they are both plugged in.
When I run
$ udevadm info -q all --attribute-walk -n /dev/ttyUSB0
when one or the other controller is plugged in, then diff the results I get:
54c54
< ATTRS{devnum}=="7"
---
> ATTRS{devnum}=="8"
61c61
< ATTRS{serial}=="A1001a6n"
---
> ATTRS{serial}=="A600cB3f"
72c72
< ATTRS{urbnum}=="85"
---
> ATTRS{urbnum}=="113"
99c99
< ATTRS{urbnum}=="57"
---
> ATTRS{urbnum}=="62"
so you can see my serial numbers are correct. Does anyone know how to
handle this situation?
Thanks!
patrick
http://www.pirobot.org
P.S. I have attached the entire output from udevadm when one of the
controllers is plugged in.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: udevadm_output
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20110502/3a7a65e0/attachment-0002.ksh>
More information about the ros-users
mailing list