-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Potential Inaccuracy in Odometry::updateFromVelocity Linear Displacement Calculation #1433
Comments
I think this is only implemented very confusing but actually correct (proof me wrong ;)) This is related to the refactoring in #1394 |
This is working correctly because when calling
To convert pose diff to vel, dt must have been used. Like this: To convert pose difference to velocity, you correctly identified the need to divide by the time difference (dt). The primary goal of the Here's a revised approach:
By following this approach, you ensure that the odometry is updated accurately based on the velocities and the time step. |
Isn't this exactly what is changed in the linked PR? |
Yes exactly. |
This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups. |
https://github.com/ros-controls/ros2_controllers/blob/a09e7af552c873ce29940b10167af99568252fb2/diff_drive_controller/src/odometry.cpp#L81C26-L81C34
I've noticed that the
Odometry::updateFromVelocity
function calculates linear displacement using the following formula:linear = (left_vel + right_vel) * 0.5
While this correctly calculates the average linear velocity, it might not be directly equivalent to linear displacement without considering the time interval (
dt
) between measurements.It's worth double-checking this calculation.
The text was updated successfully, but these errors were encountered: