Ask Your Question

Rosserial_python on samd21

asked 2019-07-17 03:52:39 -0500

Capt_Crunch gravatar image

updated 2019-07-17 06:19:34 -0500

gvdhoorn gravatar image

Hi, I am using a "modified" version of rosserial_arduino so that it works with samd21 chip. I can send/receive topics and services successfully using the terminal, but when I try to receive a topic from a ros package, it doesn't work! To be more exact, the steps I am doing are.....

  1. Upload a simple subscriber and a publisher to my samd21 chip.
  2. Connect to it using rosserial_python (this step is successful)
  3. publish a topic from the terminal using rostopic pub .......
  4. the samd21 chip listen to the topic and relays it back (using its publisher)
  5. listen to the published topic using rostopic echo... The mentioned procedure works fine, I am trying it currently with std_msgs/Bool

However, when I try to publish the a topic from a rosnode (my custom package), rosserial_python gives me multiple errors:

Mismatched protocol version in packet: lost sync or rosserial_python is from different ros release than the rosserial client
Protocol version of client is Rev 0 (rosserial 0.4 and earlier), expected Rev 1 (rosserial 0.5+)
wrong checksum for topic id and msg
wrong checksum for topic id and msg

And the errors keep on repeating (not always in the same order).

Any idea what is causing this? I have the same versions of rosserial_python and rosserial_arduino: 0.7.7

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-17 08:09:46 -0500

Capt_Crunch gravatar image

updated 2019-07-17 08:10:57 -0500

I think I have found the solution, I added sleep() inside the loop after spinOnce() and it seems to do the trick. The weird thing is that it works fine without the sleep with normal AVR arduinos, but not with the zero (samd21) ones. I will update my answer if I find the root of the problem.

edit flag offensive delete link more


Where did you get a SAMD21-compatible rosserial library? Looking for one myself.

howardcochran gravatar image howardcochran  ( 2019-08-29 15:53:48 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2019-07-17 03:52:39 -0500

Seen: 150 times

Last updated: Jul 17 '19