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

turtlebot_bringup failed to connect to iCreate

asked 2012-01-13 03:17:08 -0600

Roman Burdakov gravatar image

updated 2014-01-28 17:11:07 -0600

ngrennan gravatar image

Recently, I have connected ArbotiX to my turtlebot, and I'm not sure at what moment, but iCreate is no longer recognized by ubuntu.

process[turtlebot_node-3]: started with pid [12965]
[INFO] [WallTime: 1326474052.569072] serial port: /dev/ttyUSB0
[INFO] [WallTime: 1326474052.570262] update_rate: 30.0
[INFO] [WallTime: 1326474052.571115] drive mode: twist
[INFO] [WallTime: 1326474052.572432] has gyro: True
shutdown request: new node registered with same name
[turtlebot_node-3] process has finished cleanly.
log file: /home/turtlebot/.ros/log/5f3b4ca6-3d9d-11e1-b101-485d60f51088/turtlebot_node-3*.log

With iCreate, Kinect and arbotix connected to Ubuntu, dmesg shows following:

[41790.104418] USB Serial support registered for FTDI USB Serial Device
[41790.104717] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected
[41790.104831] usb 2-2: Detected FT232RL
[41790.104840] usb 2-2: Number of endpoints 2
[41790.104848] usb 2-2: Endpoint 1 MaxPacketSize 64
[41790.104855] usb 2-2: Endpoint 2 MaxPacketSize 64
[41790.104862] usb 2-2: Setting MaxPacketSize 64
[41790.107420] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0
[41790.107711] usbcore: registered new interface driver ftdi_sio
[41790.107720] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[42018.320055] usb 2-1: new full speed USB device using uhci_hcd and address 3
[42018.535207] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[42018.535320] usb 2-1: Detected FT232RL
[42018.535329] usb 2-1: Number of endpoints 2
[42018.535336] usb 2-1: Endpoint 1 MaxPacketSize 64
[42018.535343] usb 2-1: Endpoint 2 MaxPacketSize 64
[42018.535349] usb 2-1: Setting MaxPacketSize 64
[42018.537331] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB1

Both Usb port are used as FTDI, when only one should be. I'm not sure how does this happen, and I hope to find some help here. Thanks.

I searched here for suggestions and found similar topic http://answers.ros.org/question/3094/cant-get-data-from-create-robot-error-reading-from where I've asked for solution, but it looks like my post was removed.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2012-01-13 04:13:54 -0600

updated 2012-01-13 08:09:33 -0600

Since both the arbotix and create are using FTDI chips, I'd suggest using a udev rule to assign a new dev entry for each: /dev/arbotix /dev/create or something similar based on the FTDI serial #s.

Here's what I use to differentiate my create from my arduino (you'll have to change this, but you can use the basics for reference):

SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="FT232R USB UART", SYMLINK+="arduino"

SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*", ATTRS{manufacturer}=="FTDI", ATTRS{product}=="US232R", SYMLINK+="create"

This gives me /dev/create and /dev/arduino dev entries, even though they use similar FTDI ICs. I was lucky enough that their product descriptions varried, you may find that they are the same product but have different serials.

Update: If you want to differentiate by their ID_SERIAL, it should be something like this:

SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*", 
ENV{ID_VENDOR}=="FTDI", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A400C1Q6", 
SYMLINK+="create" 

SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*", 
ENV{ID_VENDOR}=="FTDI", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A2001nbT", 
SYMLINK+="arbotix"

Stick that in a text file called 70-myrobot.rules or something similar and throw it /etc/udev/rules.d/

Note: This is just an example and in reality you'll actually have to figure out which serial is attached to which device. Start with one being unplugged, use udevadm to match the serial. Then fix the rule accordingly. The one I provided you has a 50/50 shot of being correct ;-)

edit flag offensive delete link more

Comments

You can also create a generic rule that writes the serial# in the device name: SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="sensors/ftdi_%s{serial}", MODE="0666", GROUP="dialout"
dornhege gravatar image dornhege  ( 2012-01-13 04:20:08 -0600 )edit
0

answered 2012-01-13 07:29:15 -0600

Roman Burdakov gravatar image

updated 2012-01-13 07:30:52 -0600

I've run udevadm info to see what would be the difference between two of the ttyUSB* and they looks very much the same:

turtlebot@turtlebot:~$ udevadm info -q all -n /dev/ttyUSB1
P: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/ttyUSB1/tty/ttyUSB1
N: ttyUSB1
S: serial/by-path/pci-0000:00:1d.0-usb-0:1:1.0-port0
S: serial/by-id/usb-FTDI_FT232R_USB_UART_A400C1Q6-if00-port0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/ttyUSB1/tty/ttyUSB1
E: MAJOR=188
E: MINOR=1
E: DEVNAME=/dev/ttyUSB1
E: SUBSYSTEM=tty
E: ID_PORT=0
E: ID_PATH=pci-0000:00:1d.0-usb-0:1:1.0
E: ID_VENDOR=FTDI
E: ID_VENDOR_ENC=FTDI
E: ID_VENDOR_ID=0403
E: ID_MODEL=FT232R_USB_UART
E: ID_MODEL_ENC=FT232R\x20USB\x20UART
E: ID_MODEL_ID=6001
E: ID_REVISION=0600
E: ID_SERIAL=FTDI_FT232R_USB_UART_A400C1Q6
E: ID_SERIAL_SHORT=A400C1Q6
E: ID_TYPE=generic
E: ID_BUS=usb
E: ID_USB_INTERFACES=:ffffff:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=ftdi_sio
E: ID_IFACE=00
E: ID_VENDOR_FROM_DATABASE=Future Technology Devices International, Ltd
E: ID_MODEL_FROM_DATABASE=FT232 USB-Serial (UART) IC
E: ID_MM_CANDIDATE=1
E: DEVLINKS=/dev/serial/by-path/pci-0000:00:1d.0-usb-0:1:1.0-port0 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A400C1Q6-if00-port0

turtlebot@turtlebot:~$ udevadm info -q all -n /dev/ttyUSB0
P: /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/ttyUSB0/tty/ttyUSB0
N: ttyUSB0
S: serial/by-path/pci-0000:00:1d.0-usb-0:2:1.0-port0
S: serial/by-id/usb-FTDI_FT232R_USB_UART_A2001nbT-if00-port0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/ttyUSB0/tty/ttyUSB0
E: MAJOR=188
E: MINOR=0
E: DEVNAME=/dev/ttyUSB0
E: SUBSYSTEM=tty
E: ID_PORT=0
E: ID_PATH=pci-0000:00:1d.0-usb-0:2:1.0
E: ID_VENDOR=FTDI
E: ID_VENDOR_ENC=FTDI
E: ID_VENDOR_ID=0403
E: ID_MODEL=FT232R_USB_UART
E: ID_MODEL_ENC=FT232R\x20USB\x20UART
E: ID_MODEL_ID=6001
E: ID_REVISION=0600
E: ID_SERIAL=FTDI_FT232R_USB_UART_A2001nbT
E: ID_SERIAL_SHORT=A2001nbT
E: ID_TYPE=generic
E: ID_BUS=usb
E: ID_USB_INTERFACES=:ffffff:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=ftdi_sio
E: ID_IFACE=00
E: ID_VENDOR_FROM_DATABASE=Future Technology Devices International, Ltd
E: ID_MODEL_FROM_DATABASE=FT232 USB-Serial (UART) IC
E: ID_MM_CANDIDATE=1
E: DEVLINKS=/dev/serial/by-path/pci-0000:00:1d.0-usb-0:2:1.0-port0 /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A2001nbT-if00-port0

So, does it mean that both iCreate and ArbotiX are using the FTDI Usb interface or I messed up something again? :) I've been doing lots of different things which could change dev configuration. Anyway, based on this output it looks like only serial and serial short numbers are different.

Could you please suggest how I can create "generic rule" to distinguish iCreate and Arbotix? I'm new to this, and now sure what should I run (or which configuration file should I create/alter)? A big thanks to this community for saving me again :)

edit flag offensive delete link more

Comments

To clarify, FTDI is a chip vendor for USB serial converters--so you definitely didn't "mess anything up"; you just happened to plug in two devices of the same type (serial converters) by the same vendor. It's a race condition on which device will get X in /dev/ttyUSBX if both are plugged in on boot
JeffRousseau gravatar image JeffRousseau  ( 2012-01-13 08:26:43 -0600 )edit
PS In the future, it's better to update your original post than to leave an "answer" that's not an answer but instead more information on the original question...
JeffRousseau gravatar image JeffRousseau  ( 2012-01-13 08:38:30 -0600 )edit
It's the same FTDI chip, but the serial numbers are different. You can make udev rules for that or take the generic one I posted above and symlink that.
dornhege gravatar image dornhege  ( 2012-01-13 20:22:31 -0600 )edit
JeffRousseau, thanks, for clarification about FTDI and I will follow your advice about updating original post as well. I've used your rules, and it looks like it appears right as dev/ttyUSB0. Couldn't test everything else, cause battery on iCreate got discharged too quick :( Thanks to everyone!
Roman Burdakov gravatar image Roman Burdakov  ( 2012-01-16 00:37:05 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2012-01-13 03:17:08 -0600

Seen: 1,117 times

Last updated: Jan 13 '12