ros-controls / ros2_controllers

Generic robotic controllers to accompany ros2_control
https://control.ros.org
Apache License 2.0
355 stars 319 forks source link

Fix correct usage of angular velocity in update_odometry() function (backport #1118) #1154

Closed mergify[bot] closed 4 months ago

mergify[bot] commented 4 months ago

Thanks for this nice steering_controllers_library!

Using it however, we noticed issues in the odometry calculation where our steered robot would spin incredibly fast. There seems a small math error in the calculation which this PR fixes: The integration expects distances and angles, while the accumulators expect a velocity.

Probably also relates to https://github.com/ros-controls/ros2_controllers/issues/937


This is an automatic backport of pull request #1118 done by Mergify.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.67%. Comparing base (cb40e0b) to head (e587218).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## iron #1154 +/- ## ========================================== + Coverage 86.47% 86.67% +0.20% ========================================== Files 86 86 Lines 7399 7413 +14 Branches 612 614 +2 ========================================== + Hits 6398 6425 +27 + Misses 773 758 -15 - Partials 228 230 +2 ``` | [Flag](https://app.codecov.io/gh/ros-controls/ros2_controllers/pull/1154/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ros-controls/ros2_controllers/pull/1154/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls) | `86.67% <100.00%> (+0.20%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/ros-controls/ros2_controllers/pull/1154?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls) | Coverage Δ | | |---|---|---| | [...ring\_controllers\_library/src/steering\_odometry.cpp](https://app.codecov.io/gh/ros-controls/ros2_controllers/pull/1154?src=pr&el=tree&filepath=steering_controllers_library%2Fsrc%2Fsteering_odometry.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls#diff-c3RlZXJpbmdfY29udHJvbGxlcnNfbGlicmFyeS9zcmMvc3RlZXJpbmdfb2RvbWV0cnkuY3Bw) | `69.03% <100.00%> (ø)` | | | [...ontrollers\_library/test/test\_steering\_odometry.cpp](https://app.codecov.io/gh/ros-controls/ros2_controllers/pull/1154?src=pr&el=tree&filepath=steering_controllers_library%2Ftest%2Ftest_steering_odometry.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls#diff-c3RlZXJpbmdfY29udHJvbGxlcnNfbGlicmFyeS90ZXN0L3Rlc3Rfc3RlZXJpbmdfb2RvbWV0cnkuY3Bw) | `100.00% <100.00%> (ø)` | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/ros-controls/ros2_controllers/pull/1154/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ros-controls)