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 ros_arduino_publisher, 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
Did you fix the issue i too facing the same problem?
Hi, I'm facing the same problem. Did you fixed the problem already?
I'm facing the same problem by publishing the transform of imu. Did you fixed the problem??
Having the same problem here, I just increase the delay and the error goes away. Any Idea?