Problem with rosserial_arduino topic publishing?

asked 2017-06-12 15:31:55 -0500

thanhvu94 gravatar image

I use rosserial_arduino to publish the data received from the analog input of Arduino to ROS environment. I'm using Arduino MEGA and I install ROS on Raspberry Pi 3 (Ubuntu 16.04). The problem is that when I "rostopic echo" the topic, there are many times that all the values of the data are 0.0 , and sometimes there are a warning like this:

[WARN] [1479567965.827686]: Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details.

Then, I try to unplug and replug the USB cable between Arduino and Raspberry Pi, restart the Raspberry Pi, reupload the Arduino program or increase the power supply to the Arduino. Sometimes it solves the problems (I can publish the real data from Arduino instead of all 0.0), and sometimes the problem persist, which is very annoying. Has anyone encountered this problem, and what is the reason, how can I solve this? Is this problem common when working with rosserial_arduino or not? Or it's just because I'm using Raspberry Pi 3 instead of laptop?

Thank you.

edit retag flag offensive close merge delete