[mecanum_drive_controller] Fix Odometry Initialization #1573
[mecanum_drive_controller] Fix Odometry Initialization #1573christophfroehlich merged 5 commits intoros-controls:masterfrom
Conversation
christophfroehlich
left a comment
There was a problem hiding this comment.
We have a different API now for the handles, see #1565
Can you focus here on the actual bugfix please? @kumar-sanjeeev is already working on the handles fixes in this repo, which is not only a search-and-replace job.
Thanks @christophfroehlich, I missed that, reverted my changes.
Thank you, Kumar for making the fixes. In the new test I added, I'm still making deprecated |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1573 +/- ##
==========================================
+ Coverage 84.74% 84.86% +0.12%
==========================================
Files 124 124
Lines 11514 11566 +52
Branches 983 987 +4
==========================================
+ Hits 9758 9816 +58
+ Misses 1441 1433 -8
- Partials 315 317 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
christophfroehlich
left a comment
There was a problem hiding this comment.
I see your point of the missing init. But the test is succeeding also without the init call. Can you verify that?
It is because that issue is related to accessing uninitialized memory. Even though it is fairly easy to repro, it is not 100% reproducible. I added explicit steps to verify the base_frame_offset is set properly. |
b333def
into
ros-controls:master
(cherry picked from commit b333def)
… (#1583) Co-authored-by: Julia Jia <juliajster@gmail.com>
This PR addresses an issue where the odometry object wasn't initialized properly in the mecanum_drive_controller. The odometry_.init() call was missing, which the
base_frame_offset_could contain random values, leading to incorrect calculations in the transformation matrix. Specifically, this affects the line:and causes
velocity_in_base_frame_linear_xandvelocity_in_base_frame_linear_yto grow unbound. A test case was added to guard against this issue.