Ask Your Question
0

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

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

Kolohe113 gravatar image

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

jayess gravatar image

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

 File "/home/turtlebot/catkin_ws/src/razor_imu_9dof/nodes/imu_node.py", line 161, in <module>
    discard = ser.readlines() 
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", 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
2

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

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

Comments

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 imageKolohe113 ( 2018-12-16 14:11:26 -0600 )edit

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

Stats

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

Seen: 71 times

Last updated: Dec 14 '18