Skip to content

Multiple Camera support for transform_sensor - #24

Merged
henrygerardmoore merged 6 commits into
humblefrom
multiple_cameras
Mar 21, 2025
Merged

Multiple Camera support for transform_sensor#24
henrygerardmoore merged 6 commits into
humblefrom
multiple_cameras

Conversation

@henrygerardmoore

@henrygerardmoore henrygerardmoore commented Mar 13, 2025

Copy link
Copy Markdown

This adds the ability to use multiple cameras and relevant documentation.

Also fixes the update rate not listening to configuration by changing the default tf timeout for the publisher to be inline with the other values of that parameter.

@rlpratt12 rlpratt12 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good! The only minor change I'd suggest is making pose_covariance a vector (of vectors) to match estimation_frames so that we can pass in a different covariance for each (camera) source.

@rlpratt12

rlpratt12 commented Mar 18, 2025

Copy link
Copy Markdown
Collaborator

Also, I think we need to fix the blowing up orientation covariance issue. I confirmed this only happens in this branch, and not on main:
image

@henrygerardmoore

Copy link
Copy Markdown
Author

Generally looks good! The only minor change I'd suggest is making pose_covariance a vector (of vectors) to match estimation_frames so that we can pass in a different covariance for each (camera) source.

Good point, I'll do that.

@henrygerardmoore

Copy link
Copy Markdown
Author

Also, I think we need to fix the blowing up orientation covariance issue.

Will address this in a separate PR for that workspace

@rlpratt12 rlpratt12 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@henrygerardmoore

Copy link
Copy Markdown
Author

Tested on HW and this works well, so merging it

@henrygerardmoore
henrygerardmoore merged commit f3693bf into humble Mar 21, 2025
@henrygerardmoore
henrygerardmoore deleted the multiple_cameras branch March 21, 2025 00:10
bkanator added a commit that referenced this pull request Jul 22, 2026
The forward prediction delta was computed as std::min(to_predict_to - stamp, 0.0),
which is <= 0 in normal forward operation, forcing dt == 0 and silently disabling
predict_to_current_time: the publisher emitted the stale latest-optimized pose stamped
as "now". This manifested as a turn-rate-proportional yaw lag (~150 ms; up to ~4.4 deg
at 30 deg/s on a mecanum base) that no configuration could fix. Regressed in #24.

Clamp the delta to be non-negative (std::max, matching the 2D publisher) so forward
prediction is preserved while backward prediction is still prevented. Extract the delta
into detail::forwardPredictionDt() and add a regression test that would have caught this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bkanator added a commit that referenced this pull request Jul 22, 2026
The forward prediction delta was computed as std::min(to_predict_to - stamp, 0.0),
which is <= 0 in normal forward operation, forcing dt == 0 and silently disabling
predict_to_current_time: the publisher emitted the stale latest-optimized pose stamped
as "now". This manifested as a turn-rate-proportional yaw lag (~150 ms; up to ~4.4 deg
at 30 deg/s on a mecanum base) that no configuration could fix. Regressed in #24.

Clamp the delta to be non-negative (std::max, matching the 2D publisher) so forward
prediction is preserved while backward prediction is still prevented. Extract the delta
into detail::forwardPredictionDt() and add a regression test that would have caught this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bkanator added a commit that referenced this pull request Jul 23, 2026
The forward prediction delta was computed as std::min(to_predict_to - stamp, 0.0),
which is <= 0 in normal forward operation, forcing dt == 0 and silently disabling
predict_to_current_time: the publisher emitted the stale latest-optimized pose stamped
as "now". This manifested as a turn-rate-proportional yaw lag (~150 ms; up to ~4.4 deg
at 30 deg/s on a mecanum base) that no configuration could fix. Regressed in #24.

Clamp the delta to be non-negative (std::max, matching the 2D publisher) so forward
prediction is preserved while backward prediction is still prevented. Extract the delta
into detail::forwardPredictionDt() and add a regression test that would have caught this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bkanator added a commit that referenced this pull request Jul 23, 2026
The forward prediction delta was computed as std::min(to_predict_to - stamp, 0.0),
which is <= 0 in normal forward operation, forcing dt == 0 and silently disabling
predict_to_current_time: the publisher emitted the stale latest-optimized pose stamped
as "now". This manifested as a turn-rate-proportional yaw lag (~150 ms; up to ~4.4 deg
at 30 deg/s on a mecanum base) that no configuration could fix. Regressed in #24.

Clamp the delta to be non-negative (std::max, matching the 2D publisher) so forward
prediction is preserved while backward prediction is still prevented. Extract the delta
into detail::forwardPredictionDt() and add a regression test that would have caught this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
griswaldbrooks pushed a commit that referenced this pull request Jul 23, 2026
…3D jacobian (#35)

* fix(odometry_3d): restore predict_to_current_time forward extrapolation

The forward prediction delta was computed as std::min(to_predict_to - stamp, 0.0),
which is <= 0 in normal forward operation, forcing dt == 0 and silently disabling
predict_to_current_time: the publisher emitted the stale latest-optimized pose stamped
as "now". This manifested as a turn-rate-proportional yaw lag (~150 ms; up to ~4.4 deg
at 30 deg/s on a mecanum base) that no configuration could fix. Regressed in #24.

Clamp the delta to be non-negative (std::max, matching the 2D publisher) so forward
prediction is preserved while backward prediction is still prevented. Extract the delta
into detail::forwardPredictionDt() and add a regression test that would have caught this.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(omnidirectional_3d): compute prediction jacobian in RPY space

The assembled state jacobian placed J[1] (d(state)/d(quaternion), 15x4) directly into
the orientation columns and truncated the acceleration block (J[4].block<15,2>), leaving
Ceres an incorrect orientation gradient during 3D rotation. Convert J[1] to RPY space
(15x3) via the pseudo-inverse of the quat->rpy jacobian (chain rule). A rank-revealing
CompleteOrthogonalDecomposition is used so it degrades gracefully at gimbal lock, where
quaternion2rpy zeros rows of the quat->rpy jacobian and an explicit (A*A^T)^-1 would NaN.

Add a predictJacobians test that compares the analytic 15x15 jacobian against ceres::Jet
autodiff; it fails against the prior truncated assembly and passes with this fix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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