rosserial running please
hi,
I use ROS indigo. when i run rosrun rosserial_python serial_node.py /dev/ttyACM0
, i receive this error:
$ rosrun rosserial_python serial_node.py /dev/ttyACM0
[INFO] [WallTime: 1461764416.016787] ROS Serial Python Node
[INFO] [WallTime: 1461764416.185233] Connecting to /dev/ttyACM0 at 57600 baud
Traceback (most recent call last):
File "/home/pi/catkin_ws/install/lib/rosserial_python/serial_node.py", line 80, in <module>
client = SerialClient(port_name, baud)
File "/home/pi/catkin_ws/install/lib/python2.7/dist-packages/rosserial_python/SerialClient.py", line 382, in __init__
self.requestTopics()
File "/home/pi/catkin_ws/install/lib/python2.7/dist-packages/rosserial_python/SerialClient.py", line 389, in requestTopics
self.port.flushInput()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 500, in flushInput
termios.tcflush(self.fd, TERMIOS.TCIFLUSH)
termios.error: (5, 'Input/output error')
What can i do please?
Are you running Arduino on the same Baud rate (57600)?
yes on the same.
Are you sure that your device is connected to your machine and assigned to
/dev/ttyACM0
? Do you have permission to read and write from that device? Further, are you sure that no other program is using that device?i add :
but i don't know where is the problem
Have you checked the points I mentioned? When you google the Input/output error you're getting it seems like permissions/incorrect ports/locked ports are the most common issues.
how? can you explain it more please?
Incorrect Port Make sure when the device is connected a new file,
/dev/ttyACM0
is created. You can find this by looking at the output ofls -la /dev/ttyACM*
before and after connecting your device. You can also look at dmesg. A command I often use iswatch -n 0.2 "dmesg |tail -n 20"
.