rosserial stops connection after a short time

asked 2020-02-07 22:56:03 -0500

Chipato gravatar image

Hey,

we are trying to exchange. data with an Arduino Mega and a Jetson AGX via Ros and rosserial.

The cable is working. We tried different baudrates and combinations of our code in the Arduino.

If you are interested in Arduino Code look into:

https://github.com/Chipato1/Carolocup...

Wenn we start the robot with rosserial we get the following output:

[INFO] [1581136218.493900]: ROS Serial Python Node
[INFO] [1581136218.505352]: Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [1581136220.619801]: Requesting topics...
[INFO] [1581136220.647997]: Note: publish buffer size is 1024 bytes
[INFO] [1581136220.650620]: Setup publisher on akt_rc [std_msgs/Bool]
[INFO] [1581136220.662628]: Setup publisher on akt_autoDriveMode [std_msgs/Int16]
[INFO] [1581136220.675638]: Setup publisher on test_rc [std_msgs/UInt64]
[INFO] [1581136220.695160]: Note: subscribe buffer size is 512 bytes
[INFO] [1581136220.698744]: Setup subscriber on ctl_servoAngle [std_msgs/Float32]
[INFO] [1581136220.709951]: Setup subscriber on ctl_motorRpm [std_msgs/Int16]
[INFO] [1581136220.721557]: Setup subscriber on trj_flashLeft [std_msgs/UInt8]
[INFO] [1581136220.739306]: Setup subscriber on trj_flashRight [std_msgs/UInt8]
[INFO] [1581136220.762346]: Setup subscriber on trj_brakeLight [std_msgs/UInt8]
[INFO] [1581136220.775191]: Setup subscriber on trj_remoteLight [std_msgs/UInt8]
[INFO] [1581136319.440121]: wrong checksum for topic id and msg
[INFO] [1581136324.453357]: Packet Failed :  Failed to read msg data
[INFO] [1581136324.457195]: expected msg length is -257
[WARN] [1581136324.466140]: Last read step: data
[WARN] [1581136324.469372]: Run loop error: Serial Port read failure: Returned short (expected -257 bytes, received 0 instead).
[INFO] [1581136324.475531]: Requesting topics...
[INFO] [1581136324.830361]: Setup publisher on akt_rc [std_msgs/Bool]
[INFO] [1581136324.843134]: Setup publisher on akt_autoDriveMode [std_msgs/Int16]
[INFO] [1581136324.859314]: Setup publisher on test_rc [std_msgs/UInt64]
[WARN] [1581136342.400352]: Last read step: data checksum
[WARN] [1581136342.403832]: Run loop error: Serial Port read failure: Returned short (expected 1 bytes, received 0 instead).
[ERROR] [1581136347.431468]: Write timeout: Write timeout
[INFO] [1581136347.432904]: Requesting topics...
^C[INFO] [1581136348.460407]: Send tx stop request

If you need more informations i will provide it! Thank you very much for your help!

Greetings Carl

edit retag flag offensive close merge delete

Comments

We saw that when we changed the value for our servo often rosserial disconnects. Is there a way to stop this?

Chipato gravatar image Chipato  ( 2020-02-07 22:57:57 -0500 )edit

You appear to have quite some subscribers and publishers.

Have you changed the buffer size on the side of the Arduino?

This bit is suspect:

expected msg length is -257

that is of course impossible.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-08 04:09:58 -0500 )edit