-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync lost when publishing Odometry message. #277
Comments
I guess the message is just way too big. It is more than 700 bytes (576 only for covariances in Float64) |
You should be able to broadcast odometry no problem. Check your baud
rate. Do a rough calculation of baud based on your message size and
frequency.
…------ Original Message ------
From: "Alexis Paques" <notifications@github.com>
To: "ros-drivers/rosserial" <rosserial@noreply.github.com>
Cc: "Subscribed" <subscribed@noreply.github.com>
Sent: 3/9/2017 8:42:18 AM
Subject: Re: [ros-drivers/rosserial] Sync lost when publishing Odometry
message. (#277)
I guess the message is just way too big. It is more than 700 bytes (576
only for covariances in Float64)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Over 700 bytes, around 6kbits (1Hz) on a 57kbits channel. Even with 1Hz, it lose the sync when it should send the Odometry message. Sometimes I receive it and loose sync, and sometimes I simply loose the sync before getting the message. My second guess is the output buffer size. My solution will be to use the much shorter custom message, and make the covariance computation on the ros embedded computer instead. |
Maybe you can just increase the buffer size: |
Sure, but the size of the message is restrictive while most of the informations are unused.
|
that true, making custom message for arduino and nice and well formatted message on the ros computer is often the best solution. |
This works perfectly with the custom message @20hz
|
I ultimately opted for custom messages as well, and I use a node on the ROS PC as a "proxy" to expand the custom messages back into full messages and re-publish them. I send both odom and imu mesages with covariances at 30Hz each without any issue. For covariances, I send only the diagonals as 32-bit in the custom messages. If you're interested I'm happy to share my code. |
@atterman I would be very grateful, so I would have much less the pain of rewriting the messages :D |
Here you go: https://github.com/ecostech/rosproxy. I had to extract it from a larger project, so forgive any untidiness, but it should build in catkin_make. There is example Arduino code in rosproxy_arduino/sketchbook, and the Arduino headers you will need to copy to ros_lib are in rosproxy_arduino/sketchbook/libraries/ros_lib/rosproxy_msgs. These headers aren't re-built by catkin yet, so if you change the custom msgs for any reason then you will need to re-build ros_lib manually. Cheers. |
Thanks a lot! |
Dear,
Mega2560
Indigo, 0.6.4
I keep having Sync issues when I am trying to send the nav_msgs/Odometry message.
I have multiple other topics, LEDs subscriber to a std_msgs/ColorRGBA topic, US sensors (non blocking architecture with NewPing library) publishing a std_msgs/Bool topic. All those are working if I do not send the Odometry message (commenting off
rover_odom.publish(&odometry_msg);
) but if I uncomment it, simply loose Sync all the time.Is the message too big?
The text was updated successfully, but these errors were encountered: