rosserial arduino - wrong checksum for topic id and msg
Hi all,
I am having a problem in writing a basic ROS publisher in arduino. Here is the code:
#include <ros.h>
#include <geometry_msgs/Vector3.h>
ros::NodeHandle nh;
geometry_msgs::Vector3 velocity_wheels;
ros::Publisher encoder_ticks_pub("re_ticks",&velocity_wheels); // Publish the encoder ticks
void setup()
{
nh.getHardware()->setBaud(115200);
nh.initNode(); // Initialize Node
nh.advertise(encoder_ticks_pub);
}
void loop()
{
velocity_wheels.x = 0.1;
velocity_wheels.y = 0.2;
velocity_wheels.z = 0.3;
encoder_ticks_pub.publish(&velocity_wheels);
nh.spinOnce();
delay(10);
}
When I run it using rosrun rosserial_python serial_node.py _port:=/dev/dr_arduino _baud:=115200
it gives me the following : [INFO] [WallTime: 1459356598.600339] wrong checksum for topic id and msg
. The complete output is :
[INFO] [WallTime: 1459356541.444546] ROS Serial Python Node
[INFO] [WallTime: 1459356541.447199] Connecting to /dev/dr_arduino at 115200 baud
[INFO] [WallTime: 1459356543.574293] Note: publish buffer size is 512 bytes
[INFO] [WallTime: 1459356543.574697] Setup publisher on re_ticks [geometry_msgs/Vector3]
[INFO] [WallTime: 1459356598.600339] wrong checksum for topic id and msg
Also, sometime I get this error : tried to publish before configured topic id 125
I am not able to understand what is causing this issue. If I run the following rosarduinopublisher, it works fine.
Update:
If I increase the delay from delay(10) to delay(100), the problem does not occur. Can it because the data is being published at a very high speed and the buffer size is not enough? Will it make sense to increase the buffer size?
Any help will be appreciated.
Thanks in advance.
Naman
Asked by Naman on 2016-03-30 12:09:56 UTC
Comments
Did you fix the issue i too facing the same problem?
Asked by Kishore Kumar on 2016-09-11 14:39:10 UTC
Hi, I'm facing the same problem. Did you fixed the problem already?
Asked by Zero on 2016-10-26 01:07:00 UTC
I'm facing the same problem by publishing the transform of imu. Did you fixed the problem??
Asked by أسامة الادريسي on 2017-11-06 02:35:11 UTC
Having the same problem here, I just increase the delay and the error goes away. Any Idea?
Asked by richrdcm on 2018-04-30 16:13:07 UTC