ROBOTIS-GIT / turtlebot3

ROS packages for Turtlebot3
http://turtlebot3.robotis.com
Apache License 2.0
1.51k stars 1.03k forks source link

FIX: `/odom` velocity always zero #1036

Closed marco-ambrosio closed 2 days ago

marco-ambrosio commented 2 days ago

I noticed that velocity reported on topic /odom was always zero, so I dug a bit into the problem and I found this simple mistake that was preventing the velocity to be computed correcty.

As you can see in the changed file the mistake was to subtract an entire timestamp in nanoseconds from the field nanoseconds of an header (which obviously contains just the nanosecond and not the entire timestamp in nanoseconds). This was leading to a huge negative duration and so an extremely small speed (in the order of 1e-14).

Hope this can be merged since we have more than 10 Turtlebots to update with this change.

marco-ambrosio commented 2 days ago

already addressed and solved in #1001