0
$\begingroup$

Rosanswers logo

I want to get the control of a servo under ROS, for that I am using arduino UNO, following this tutorial. When I run the rosserial_python serial_node.py at the moment when I publish the angle I got this error:

Traceback (most recent call last):


 File "/home/jcardenasc93/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 82, in <module>
    client.run()



File "/home/jcardenasc93/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 495, in run
    self.requestTopics()
  File "/home/jcardenasc93/catkin_ws/src/rosserial/rosserial_python/src/rosserial_python/SerialClient.py", line 392, 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')

Could anyone help me please? I don't understand why this is happening


Originally posted by jcardenasc93 on ROS Answers with karma: 70 on 2016-01-31

Post score: 0


Original comments

Comment by Gary Servin on 2016-02-01:
does your user have permission to access the serial port?

did you try specifying the port to use?

rosrun rosserial_python serial_node.py /dev/ttyUSB0

or

rosrun rosserial_python serial_node.py /dev/ttyACM0

Comment by jcardenasc93 on 2016-02-01:
Yes @gary-servin I changed the permission with chmod and at the moment to run the rosserial_python serial_node.py I gave the port parameter (in my case /dev/ttyACM0). At the beginning it looks like works, but when the servo begin to move the node crashes.

Comment by Gary Servin on 2016-02-02:
can you try disconnecting the servos and running the serial node again? If it works without the servo, then it should be a problem related with the power supply, the regulator on the arduino can't provide enough current to the servo and it resets the arduino when you try to move the motor

Comment by jcardenasc93 on 2016-02-10:
Many thanks that was the problem there isn't enough current. With an external power supply it works fine

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The problem as @gary-servin said below it was for insufficient current. That solves with an external power supply.


Originally posted by jcardenasc93 with karma: 70 on 2016-02-10

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by adelleodel on 2016-05-26:
external power supply for arduino or motor?

Comment by NeoM on 2018-10-22:
I had the same problem and it was an excess of demanded current from the servo, thanks for the solution

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.