Ask Your Question

Failed to open port /dev/ttyUSB0

asked 2012-10-25 06:28:51 -0600

paetti88 gravatar image

updated 2012-10-29 04:45:43 -0600

hey, i got some problems with getting my turtlebot started.

  1. have and ubuntu 11.10 running with ros on asus eeepc.
  2. started with the turotials at ROS Turtlebot Tutorial
  3. at the tutorial turtlebot_bringup i got the error Failed to open port /dev/ttyUSB0

to be a bit mor clear i tried rostopic echo /diagnostics whitch presents me this message as well as the Dashoard as well as if i type roslaunch turtlebot-bringup minimal.launch

4.i tried to solf this problem using with this possible solutions


but nothing changed

again more clear i changed the chmod of /dev/ttyUSB0, i tried udev rules, i have tested if there is an connection to this port with lsusb and dmesg | grep usb as well ass cd /dev/serial/by_id/ ls -al.

All confirm me my serial device converter (needed for the connection from pc to rommba cleaner) is attached to ttyUSB0

My anybody got some advices for me?



Bus 004 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

dmesg|grep usb

[  130.917744] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0

cd /dev/serial/by_id/``ls -al

lrwxrwxrwx 1 root root 13 2012-10-29 15:07 usb-FTDI_FT232R_USB_UART_A900Y9QC-if00-port0 -> ../../ttyUSB0

rostopic echo /diagnostics

  seq: 4
    secs: 1351520860
    nsecs: 565383911
  frame_id: ''
    level: 2
    name: TurtleBot Node
    message: Failed to open port /dev/ttyUSB0.  Please make sure the Create cable is plugged into the computer. 

    hardware_id: ''
    values: []

roslaunch turtlebot_bringup minimal.launch

turtlebot@turtlebot-R002:~$ roslaunch turtlebot_bringup minimal.launch
... logging to /home/turtlebot/.ros/log/bf90e012-21d5-11e2-98d7-0008ca665690/roslaunch-turtlebot-R002-8292.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server


 * /use_sim_time
 * /robot_pose_ekf/sensor_timeout
 * /diagnostic_aggregator/analyzers/sensors/path
 * /robot_pose_ekf/imu_used
 * /robot_pose_ekf/odom_used
 * /robot/name
 * /diagnostic_aggregator/analyzers/nodes/timeout
 * /diagnostic_aggregator/analyzers/mode/timeout
 * /diagnostic_aggregator/analyzers/sensors/timeout
 * /diagnostic_aggregator/analyzers/power/type
 * /turtlebot_node/update_rate
 * /diagnostic_aggregator/analyzers/power/timeout
 * /diagnostic_aggregator/analyzers/mode/type
 * /diagnostic_aggregator/analyzers/digital_io/path
 * /diagnostic_aggregator/analyzers/digital_io/timeout
 * /diagnostic_aggregator/analyzers/nodes/path
 * /rosdistro
 * /robot_description
 * /diagnostic_aggregator/base_path
 * /robot_pose_ekf/freq
 * /robot_pose_ekf/publish_tf
 * /app_manager/interface_master
 * /robot_pose_ekf/vo_used
 * /diagnostic_aggregator/analyzers/sensors/type
 * /diagnostic_aggregator/analyzers/digital_io/startswith
 * /diagnostic_aggregator/analyzers/power/path
 * /robot_pose_ekf/output_frame
 * /diagnostic_aggregator/analyzers/mode/path
 * /diagnostic_aggregator/analyzers/digital_io/type
 * /diagnostic_aggregator/analyzers/mode/startswith
 * /rosversion
 * /diagnostic_aggregator/pub_rate
 * /robot_state_publisher/publish_frequency
 * /diagnostic_aggregator/analyzers/sensors/startswith
 * /diagnostic_aggregator/analyzers/power/startswith
 * /turtlebot_node/bonus
 * /robot/type
 * /diagnostic_aggregator/analyzers/nodes/type
 * /diagnostic_aggregator/analyzers/nodes/contains

    appmaster (app_manager/appmaster)
    app_manager (app_manager/app_manager)
    turtlebot_node (turtlebot_node/
    turtlebot_laptop_battery (turtlebot_node/
    robot_state_publisher (robot_state_publisher/state_publisher)
    diagnostic_aggregator (diagnostic_aggregator/aggregator_node)
    robot_pose_ekf (robot_pose_ekf/robot_pose_ekf)

auto-starting new master
process[master]: started with pid [8310]

setting /run_id to bf90e012-21d5-11e2-98d7-0008ca665690
process[rosout-1]: started with pid [8323]
started core service [/rosout]
process[appmaster-2]: started with pid [8335]
process[app_manager-3]: started with pid [8336]
process[turtlebot_node-4]: started with pid [8337]
process[turtlebot_laptop_battery-5]: started with pid [8338]
process[robot_state_publisher-6]: started with pid ...
edit retag flag offensive close merge delete



First, post the output of the commands. Second, try opening the port in gtkterm or similar (or even cat first) to see if it can be opened in principle and send some chars.

dornhege gravatar image dornhege  ( 2012-10-25 07:01:08 -0600 )edit

i am dont know how i format the terminal output properly .. how do i do this?

paetti88 gravatar image paetti88  ( 2012-10-25 08:55:44 -0600 )edit

gtkterm or here? Here, you can use <pre> tags or for code indent by 4 spaces.

dornhege gravatar image dornhege  ( 2012-10-26 00:10:12 -0600 )edit

I assume gtkterm is similar to minicom, but I always try minicom first.

PerkinsJames gravatar image PerkinsJames  ( 2012-10-26 09:50:02 -0600 )edit

To me it looks like everything is OK. Can you try just opening it using gtkterm or similar to see if you can open the port with the same parameters. If that works the only explanation I have is that the error msg might be misleading, i.e. the port could be opened, but commnucation fails (bad cable, protocol, etc.)

dornhege gravatar image dornhege  ( 2012-10-29 04:53:11 -0600 )edit

According to the error msg you added, there is a comm error. So, I would check at the other end, i.e. is there only one USB device (i.e. might it just try to connect to something else), is cables, hardware, etc. OK.

dornhege gravatar image dornhege  ( 2012-10-29 04:56:09 -0600 )edit

im not sure how i have to use gtkterm to open it how i do this? ... no there are no other usb devices connectet.

paetti88 gravatar image paetti88  ( 2012-10-29 05:28:54 -0600 )edit

at this problem they say they "recommend to check roomba stack" .. what does this mean?

paetti88 gravatar image paetti88  ( 2012-10-29 05:38:46 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted

answered 2012-10-29 13:28:05 -0600

kszonek gravatar image

updated 2012-10-29 13:29:00 -0600

Did you reload udev rules after adding new ones? Are you sure rules were propertly added? There is still something wrong with permissions.

Post output of ls -la /dev/ttyUSB* and groups

First you need to be in dialout group, then make sure tty is owned by this group.

To add yourself to group:

gpasswd -a yourUserName dialout

Then relog / restart X server / reboot to make sure

udev rule:

edit flag offensive delete link more


crw-rw---- 1 root dialout 188, 0 May 30 17:05 /dev/ttyUSB0

Sentinal_Bias gravatar image Sentinal_Bias  ( 2013-05-29 21:05:27 -0600 )edit

answered 2013-07-10 08:53:54 -0600

newe1344 gravatar image

You could check the permissions of ttyUSB0

ls -la /dev/

If the perms are not 666 or a+rw then you need to boot with usb that has permission to access. Basically you need to create a new rule in /etc/udev/rules.d:

Create a new file with your specific permissions (higher numbers override existing rules):

cd /etc/udev/rules.d/
touch 80-turtlebot.rules
sudo pico 80-turtlebot.rules

Add the following lines for every usb device:

#serial usb
SUBSYSTEM=="usb", ATTRS{idProduct}=="6001", ATTRS{idVendor}=="0403", MODE="0666", GROUP="turtlebot"

To find the product id and vendor id, do lsusb -v, I think if you just do regular lsusb its vendor:product. Shift + PgUp to view previous parts of the cli.

finally reboot

sudo reboot
edit flag offensive delete link more

answered 2014-09-05 05:56:26 -0600

oohito gravatar image

I fixed it by comment out code like below.

$ roscd create_driver/src/
$ diff 

PySerial opens port in constructor, so you need not open explicitly.

edit flag offensive delete link more

answered 2012-10-30 05:56:43 -0600

paetti88 gravatar image

updated 2012-10-30 05:58:56 -0600

thanks to all of you for your help i think the problem changed somehow from

failed to open prot devttyusb0 to: failed to contact device with error [Error reading from SCI port. No Data ] Please check if create is powered on and the connector is plugged into into the create

so i think this problem is solved i will open a new question and accept this on as correct

ps: udev rule looks like yours, the user owns the group dialout

ls-al for /dev/ttyusb0 crw-rw---- 1 root dialout 188,0 ....

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2012-10-25 06:28:51 -0600

Seen: 34,902 times

Last updated: Jul 10 '13