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

Both Device (turtlebot and SparkFun Razer 9DOF IMU) use /dev/ttyUSB0 and have conflict

asked 2018-12-14 15:23:02 -0500

Kolohe113 gravatar image

updated 2018-12-14 17:32:08 -0500

jayess gravatar image

When I tired to roslaunch turtlebot_bringup minimal.launch and rosrun razer_imu_9dof, gave me the following error:

 File "/home/turtlebot/catkin_ws/src/razor_imu_9dof/nodes/", line 161, in <module>
    discard = ser.readlines() 
  File "/usr/lib/python2.7/dist-packages/serial/", line 495, in read
    raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)')
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

I believe this has to do with both device using dev/ttyUSB0. Its there a way to make the imu or the turtlebot to use another port? I tried to make the turtlebot use dev/ttyS0 but it will not publish any odom message. Can anyone help me with this issue?

I am using ROS Kinetic and Ubuntu 16.04

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-12-14 16:51:51 -0500

ahendrix gravatar image

Presumably you have two USB serial port adapters, one for Turtlebot and another for the Razor IMU. These will have different device paths; probably /dev/ttyUSB0 and /dev/ttyUSB1 (or maybe /dev/ttyACM0). /dev/ttyS0 corresponds to a built-in serial port (not a USB serial port).

You need to figure out which software device corresponds to each physical port, and then configure the ROS nodes to use those software devices.

With USB serial adapters, I find that the easiest way to do this the first time is to unplug all of the devices, and plug them in one at a time. Each time you plug in a new USB serial device, you should see a new file show up in /dev ; this is your new device. (you can also look at the logs in /var/log/syslog or the output from the dmesg command to see the log messages when new devices are plugged in).

Devices don't always get the same names after a reboot, so once you know which hardware device corresponds to a software device, there are lots of tutorials on google for how to create UDEV rules which assign the same device name on every boot:

edit flag offensive delete link more


Thank you for your answer! I am still a bit confused because when I plugged in both devices, I only saw /dev/ttyUSB0 under /dev and no /dev/ttyUSB1 and /dev/ttyACM0.

Kolohe113 gravatar image Kolohe113  ( 2018-12-16 14:11:26 -0500 )edit

Question Tools

1 follower


Asked: 2018-12-14 15:23:02 -0500

Seen: 245 times

Last updated: Dec 14 '18