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.
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.