Ask Your Question
1

Failed to open port /dev/ttyUSB0

asked 2012-08-13 07:26:12 -0600

buma676 gravatar image

updated 2014-01-28 17:13:19 -0600

ngrennan gravatar image
Failed to open port /dev/ttyUSB0.  Please make sure the Create cable is plugged into the computer.

this is the message I get when I try to run

roslaunch turtlebot_bringup minimal.launch

The cable is plugged in to the computer, but it can't seem to find it. Any advice? Thanks!


hyness@turtlebot:~$ roslaunch turtlebot_bringup minimal.launch
... logging to /home/hyness/.ros/log/e48df4ec-e303-11e1-b4b3-94dbc99cb3ba/roslaunch-turtlebot-28662.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 http://192.168.1.101:53917/

SUMMARY
========

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

NODES
  /
    app_manager (app_manager/app_manager)
    appmaster (app_manager/appmaster)
    diagnostic_aggregator (diagnostic_aggregator/aggregator_node)
    robot_pose_ekf (robot_pose_ekf/robot_pose_ekf)
    robot_state_publisher (robot_state_publisher/state_publisher)
    turtlebot_laptop_battery (turtlebot_node/laptop_battery.py)
    turtlebot_node (turtlebot_node/turtlebot_node.py)

ROS_MASTER_URI=http://192.168.1.101:11311

core service [/rosout] found
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[appmaster-1]: started with pid [28714]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[app_manager-2]: started with pid [28715]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[turtlebot_node-3]: started with pid [28717]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[turtlebot_laptop_battery-4]: started with pid [28721]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[robot_state_publisher-5]: started with pid [28731]
/opt/ros/fuerte/stacks/turtlebot/turtlebot_node/nodes/turtlebot_node.py:54: UserWarning: roslib.rosenv is deprecated, please use rospkg or rosgraph.rosenv
  import roslib.rosenv
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[diagnostic_aggregator-6]: started with pid [28735]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[robot_pose_ekf-7]: started with pid [28767]
turtlebot_apps.installed
loading installation data for [turtlebot_apps.installed]
[INFO] [WallTime: 1344878483.388894] serial port: /dev/ttyUSB0
[INFO] [WallTime: 1344878483.390361] update_rate: 30.0
[INFO] [WallTime: 1344878483.391525] drive mode: twist
[INFO] [WallTime: 1344878483.392730] has gyro: True
[INFO] [WallTime: 1344878483.524643] self.gyro_measurement_range ...
(more)
edit retag flag offensive close merge delete

Comments

on the laptop or on the computer?

buma676 gravatar imagebuma676 ( 2012-08-14 04:58:52 -0600 )edit

this stuff is from the laptop; does this mean it is a problem with the cable?

buma676 gravatar imagebuma676 ( 2012-08-14 05:07:43 -0600 )edit
1

Did you manually plug/unplug all the time? If not, you might have a hardware problem. Can you rerun the dmesg without the grep? There might be some errors like Error: -71 or similar.

dornhege gravatar imagedornhege ( 2012-08-14 05:17:49 -0600 )edit

OK, at least no other errors, but it seems like a hardware problem. Do you have some parts to change (other cable/laptop/ftdi), then you can figure out what it is. If you wiggle around the cable, can you provoke the disconnect?

dornhege gravatar imagedornhege ( 2012-08-14 06:06:44 -0600 )edit

I am working on getting another cable to see if that is the problem; what do you mean provoke the disconnect? I haven't gotten it to work yet, I don't think it is ever connected.

buma676 gravatar imagebuma676 ( 2012-08-14 06:08:48 -0600 )edit

when i try the tail -f /var/log/messages, i get tail: cannot open `/var/log/messages' for reading: No such file or directory

buma676 gravatar imagebuma676 ( 2012-08-14 07:05:37 -0600 )edit

According to the dmesg log it is connected (always for a short while). That's what you should look out for. What I meant was: Does it immediately say disconnect when you move the cable a bit (then it's probably the cable or connector)

dornhege gravatar imagedornhege ( 2012-08-14 08:11:23 -0600 )edit

You probably need sudo/root for accessing /var/log/messages

dornhege gravatar imagedornhege ( 2012-08-14 08:11:49 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-08-13 15:28:08 -0600

Maybe udev has assigned another device name to your Create cable (/dev/ttyUSB1, /dev/ttyUSB2...)?

Here are some commands that might help you identify the correct device name:

ls /dev/ttyUSB*
dmesg | grep ttyUSB

Once you find the correct device name you should update your turtelbot configuration.

If neither of the above commands produces results, then there might be something wrong with your cable.

Good luck!

edit flag offensive delete link more

Comments

1

Do a tail -f /var/log/messages and watch the messages as you plug in the USB cable. This should tell you the device its naming it

PerkinsJames gravatar imagePerkinsJames ( 2012-08-14 06:36:30 -0600 )edit
0

answered 2012-08-15 10:44:01 -0600

updated 2012-08-15 10:44:19 -0600

You can specify a serial device that is independent of which order linux brings it up (which is not the case for /dev/ttyXXX) by using its serial identifier, which can be found in /dev/serial/by-id/ directory.

If you cd to the directory and look at ls -al you can see that the devices point to various mount points `/dev/ttyXXX'.

Not sure it will help in this particular case but it's useful when specifying devices in launch files, for example.

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

Stats

Asked: 2012-08-13 07:26:12 -0600

Seen: 6,230 times

Last updated: Aug 15 '12