Ask Your Question

Revision history [back]

rosserial error when publishing IMU and ultarsonic sensors datas from arduino mega 2560

Hi,

When I run this code to publish range data of three ultrasonic sensors and an MPU6050 i receive this warning:

~$ rosrun rosserial_python serial_node.py /dev/ttyACM0
[INFO] [1509804545.170605]: ROS Serial Python Node
[INFO] [1509804545.177437]: Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [1509804547.408885]: Note: publish buffer size is 512 bytes
[INFO] [1509804547.409491]: Setup publisher on imu_orientation [geometry_msgs/Quaternion]
[INFO] [1509804547.418883]: Setup publisher on /ultrasound1 [sensor_msgs/Range]
[INFO] [1509804547.429312]: Setup publisher on /ultrasound2 [sensor_msgs/Range]
[INFO] [1509804547.446056]: Setup publisher on /ultrasound3 [sensor_msgs/Range]
[WARN] [1509804601.053039]: Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details.
^C[INFO] [1509804658.043868]: Send tx stop request

The arduino code is here: https://pastebin.com/8Du4vT9j