rosserial_arduino tutorial servo controller not working properly

asked 2017-03-11 02:40:52 -0600

dinesh gravatar image

updated 2017-03-11 02:42:47 -0600

I am following this tutorial, but after i publish the /servo topic to move the motor by giving command rostopic pub servo std_msgs/UInt16 90, the motor moves but the node shuts down showing this error:

[INFO] [WallTime: 1489221090.819442] ROS Serial Python Node

[INFO] [WallTime: 1489221090.823630] Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [WallTime: 1489221092.949300] Note: subscribe buffer size is 280 bytes
[INFO] [WallTime: 1489221092.949652] Setup subscriber on servo [std_msgs/UInt16]
Traceback (most recent call last):
  File "/home/robot/ros_arduino_ws/src/rosserial/rosserial_python/nodes/", line 85, in <module>
  File "/home/robot/ros_arduino_ws/src/rosserial/rosserial_python/src/rosserial_python/", line 503, in run
  File "/home/robot/ros_arduino_ws/src/rosserial/rosserial_python/src/rosserial_python/", line 389, in requestTopics
  File "/usr/lib/python2.7/dist-packages/serial/", line 500, in flushInput
    termios.tcflush(self.fd, TERMIOS.TCIFLUSH)
termios.error: (5, 'Input/output error')

Here after the msg Setup subscriber on servo, i published the topic /servo with value 1-180, than the error came. After this error comes when i try to again launch the same rosserial_python node it gives error saying:

[ERROR] [WallTime: 1489221031.517359] Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

After i reinsert the arduino port, this error goes, but the first error comes again. Since all other tutorials are running properly i think the problem is not with rosserial package. Because i have tried them from both debian and source as i found in this ans, but the same error comes. So how can i remove this error.

edit retag flag offensive close merge delete