ros2_controllers
ros2_controllers copied to clipboard
Fix steering controllers library kinematics (backport #1150)
A follow-up of #1149 to fix bugs of the steering library, namely
- in open-loop mode, zero steering angle was used for IK calculation discussed in #954 (my fix breaks API of the library, but it had no information about open_loop. I could duplicate the get_commands() method to get_commands_open_loop(), but that would break ABI too?)
- wrong wheelspeed was used (traction on steering wheel, instead of other axle was assumed)
- Improve odometry of overdetermined measurements. use nonlinear dependency from wheel speed to calculate linear velocity (ideal) vs the old linear average:
This should finally fix #937 #933 and #789
This is an automatic backport of pull request #1150 done by Mergify.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 86.84%. Comparing base (
5d8a1f5) to head (5f1fd99).
Additional details and impacted files
@@ Coverage Diff @@
## humble #1194 +/- ##
==========================================
+ Coverage 86.64% 86.84% +0.20%
==========================================
Files 86 86
Lines 7489 7551 +62
Branches 617 619 +2
==========================================
+ Hits 6489 6558 +69
+ Misses 767 761 -6
+ Partials 233 232 -1
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 86.84% <100.00%> (+0.20%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| ...roller/test/test_ackermann_steering_controller.cpp | 100.00% <ø> (ø) |
|
| ...ntroller/test/test_bicycle_steering_controller.cpp | 100.00% <100.00%> (ø) |
|
| ...steering_controllers_library/steering_odometry.hpp | 100.00% <100.00%> (ø) |
|
| ...llers_library/src/steering_controllers_library.cpp | 74.16% <100.00%> (ø) |
|
| ...ring_controllers_library/src/steering_odometry.cpp | 81.41% <100.00%> (+7.61%) |
:arrow_up: |
| ...ontrollers_library/test/test_steering_odometry.cpp | 100.00% <100.00%> (ø) |
|
| ...troller/test/test_tricycle_steering_controller.cpp | 100.00% <ø> (ø) |