rosserial kinetic [Error 5] Input/output error
I sent a message from a moveit demo.launch (angles of the joints from sensor_msgs::JointState) which I created from moveit setup assistant to a .cpp file, and publish a converted value to my .ino file (arduino file).
The connection and subscriber/publisher worked fine when connected only an arduino board (I used arduino mega 2560 here, and chose the correct serial port and baud rate), but when I connected my servo motors to the arduino board, the connection was failed and showed me:
Run loop error: [Error 5] Input/output error
The error seemed cause by the connection of the servo. But I have run the ServoControl tutorial in rosserial.
Is there anyone can help me for this?
Is the requested voltage too big to be given?
This is my first time on ROS Answers, sorry for the bad typesetting.
Thanks, Wolf
Edited 1: error information
[WARN] [1545576797.165756]: Last read step: data checksum
[WARN] [1545576797.168735]: Run loop error: [Error 5] Input/output error
Traceback (most recent call last):
File "/home/wolf/Mechanical_Practice/catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 89, in <module>
client.run()
File "/home/wolf/Mechanical_Practice/catkin_ws/src/rosserial/rosserial_python/SerialClient.py", line 554, in run
self.port.flushInput()
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 532, in flushInput
self.reset_input_buffer()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 566, in reset_input_buffer
termios.tcflush(self.fd, termios.TCIFLUSH)
termios.error: (5, 'Input/output error')
Can you please update your question with a copy and paste of the entire error?
jayess: error updated.
BTW, how can you make your typesetting so clear?
If you're trying to run servos and the arduino mega off just the usb port of your computer then there probably isn't enough current. A computer's usb port can only provide 500mA, if the servo tries to draw more it will brown-out the arduino.
@WolfChen Paste your formatted text into the text editor, highlight it, click on the
101010
button or pressCtrl-k
.PeterBlackerThe3rd:
That is one of my guess, too.
But I did run the ServoControl example with the same motor before, it worked fine...
So I am not sure if that would be the answer.
Btw, I connected another battery to the motor to supply the working current/voltage.
jayess: It works, lol! Thank