Skip to content

[mecanum_drive_controller] Fix Odometry Initialization (backport #1573)#1583

Merged
christophfroehlich merged 1 commit intohumblefrom
mergify/bp/humble/pr-1573
Mar 11, 2025
Merged

[mecanum_drive_controller] Fix Odometry Initialization (backport #1573)#1583
christophfroehlich merged 1 commit intohumblefrom
mergify/bp/humble/pr-1573

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Mar 11, 2025

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:

tf2::Vector3 linear_transformation_from_center_2_base =
    angular_transformation_from_center_2_base *
    tf2::Vector3(-base_frame_offset_[0], -base_frame_offset_[1], 0.0);

and causes velocity_in_base_frame_linear_x and velocity_in_base_frame_linear_y to grow unbound. A test case was added to guard against this issue.


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

@christophfroehlich christophfroehlich merged commit bc2e1a0 into humble Mar 11, 2025
12 of 14 checks passed
@christophfroehlich christophfroehlich deleted the mergify/bp/humble/pr-1573 branch March 11, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants