ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Problems when using rosserial on Raspberry Pi (wrong checksum for msg length)

asked 2018-08-26 17:07:09 -0500

Binson gravatar image

Hello everyone,

I'm using an Arduino Mega 2560 (with Adafruit Motor Shield on it) and I'm trying to transfer data from it to a Rasperry Pi 3B using rosserial. However I have an error in communication when using the "Hello World" example that appears only with the RPi3 and not with my main computer.

When using rosserial from my main computer everything is working well:

rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=57600
[INFO] [WallTime: 1535317376.974559] ROS Serial Python Node
[INFO] [WallTime: 1535317376.977290] Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [WallTime: 1535317380.120512] Note: publish buffer size is 512 bytes
[INFO] [WallTime: 1535317380.120794] Setup publisher on chatter [std_msgs/String]

When running the same code from the RPi3 I got this error:

rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=56700
[INFO] [1535317489.629288]: ROS Serial Python Node
[INFO] [1535317489.650718]: Connecting to /dev/ttyACM0 at 56700 baud
[INFO] [1535317491.929815]: wrong checksum for msg length, length -2296
[INFO] [1535317491.931260]: chk is 10
[ERROR] [1535317491.934192]: Mismatched protocol version in packet: lost sync or rosserial_python is from different ros release than the rosserial client
[INFO] [1535317491.935558]: Protocol version of client is unrecognized, expected Rev 1 (rosserial 0.5+)
[INFO] [1535317492.933539]: wrong checksum for msg length, length 16
[INFO] [1535317492.934947]: chk is 175
[INFO] [1535317493.933598]: wrong checksum for msg length, length -4348
[INFO] [1535317493.936049]: chk is 125
[INFO] [1535317494.935642]: wrong checksum for msg length, length 16
[INFO] [1535317494.938213]: chk is 175
[ERROR] [1535317494.946257]: Mismatched protocol version in packet: lost sync or rosserial_python is from different ros release than the rosserial client
[INFO] [1535317494.948985]: Protocol version of client is unrecognized, expected Rev 1 (rosserial 0.5+)
[INFO] [1535317495.936054]: wrong checksum for msg length, length -4348
[INFO] [1535317495.938623]: chk is 125
[ERROR] [1535317496.935010]: Mismatched protocol version in packet: lost sync or rosserial_python is from different ros release than the rosserial client
[INFO] [1535317496.937569]: Protocol version of client is unrecognized, expected Rev 1 (rosserial 0.5+)
[INFO] [1535317497.934976]: wrong checksum for msg length, length -4348
[INFO] [1535317497.937484]: chk is 125
[INFO] [1535317498.934526]: wrong checksum for msg length, length 16
[INFO] [1535317498.936874]: chk is 175
[INFO] [1535317499.938173]: wrong checksum for msg length, length -4336
[INFO] [1535317499.940590]: chk is 125
[INFO] [1535317500.937859]: wrong checksum for msg length, length -4336
[INFO] [1535317500.940557]: chk is 125

Seems to be a version related issue but I checked and the rosserial arduino library is up to date in the arduino (0.7.9). Maybe it's from the version difference between the computer and the RPi3 but I don't know what I can do about it.

Computer characteristics:

  • Ubuntu 14.04.5 LTS
  • ROS distro: indigo
  • ROS version: 1.11.21
  • rosserial_python version: 0.6.4

Raspberry Pi 3B characteristics:

  • Ubuntu 16.04.2 LTS
  • ROS distro: kinetic
  • ROS version: 1.12.13
  • rosserial_python version: 0.7.7

FYI, the "HelloWorld ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
3

answered 2018-08-27 04:07:03 -0500

pcoenen gravatar image

You are using the wrong baud rate on your RPi, it should be 57600 instead of 56700.

edit flag offensive delete link more

Comments

Indeed... I feel so stupid now, I will check it later and close the question if it works.

Binson gravatar image Binson  ( 2018-08-27 13:50:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-26 17:07:09 -0500

Seen: 944 times

Last updated: Aug 27 '18