Skip to content

Pose estimator doesn't update odometry pose with vision measurements over time, leading to drift #7881

Open
@calcmogul

Description

@calcmogul

Initially reported by FRC team 2363:

Step 9 of PoseEstimator.addVisionMeasurement() sets the PoseEstimator pose estimate to a vision-compensated version of the latest odometry object pose, but the odometry object's pose is only updated by twists passed to PoseEstimator.updateWithTime(). This means the odometry pose is still allowed to drift over time instead of being gradually fixed by vision measurements. In other words, the odometry is only ever getting fixed by one vision measurement instead of a backlog of all of them.

The old implementation applied vision updates to old pose estimates, then replayed odometry updates up to the current time. That was too expensive at the time, so idk if we can fix this properly.

The odometry object pose not being vision-compensated also causes PoseEstimator.resetRotation() to make the translation estimate teleport from the vision-compensated version to the odometry-only version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions