Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pose estimation v2 #154

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

KangarooKoala
Copy link
Contributor

Switched from 2910 to WPILib geometry classes
Added method to convert from Vector2 to Translation2d
Reformatted doc comments
Specified field-centric frame of reference
Switched from hub-centric to field-centric
Added null checks for gyro angle
Added getGyroscopeYaw() and getFieldCentricTurretAngle()
Removed getVisionGyroRobotPoseRelativeToStart()
Specified method frames of reference

Changed from inches to meters
Extracted turret relative velocity to separate method
Reformatted pose doc comments
Added method to convert from Vector2 to Translation2d to GeoConvertor
Added doc comment to TargetLocalizer specifying field-centric poses
Switched back to inches (should discuss and finalize)
Switched from hub-centric to field-centric
Added null checks for gyro angle
Added getGyroscopeYaw() and getFieldCentricTurretAngle()
Removed getVisionGyroRobotPoseRelativeToStart()
Specified frames of reference
Formatted some doc comments
@KangarooKoala
Copy link
Contributor Author

Next update is to combine drivebase pose and vision+gyro pose with SwerveDrivePoseEstimator, but since that would involve somewhat intrusive modifications to DrivebaseSubsystem (possibly even moving all of the pose stuff to TargetLocalizer), I'm holding off on it until these changes get merged in.

@KangarooKoala
Copy link
Contributor Author

Also, we should decide if we're going to use inches or meters.

Made startingPose and gyroAdjustmentAngle non-final
Added resetPose() and resetPoseFromAutoStartPose()
Reset target localizer pose in autonomousInit()
Copy link
Contributor

@TAKBS2412 TAKBS2412 left a comment

Choose a reason for hiding this comment

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

Haven't examined the math in detail yet will look later.

…to pose-estimation

Used turretAngularFF instead of TURRET_ANGULAR_FF
…to pose-estimation

Fix typo in getDepthVelocity()
Added check if the limelight has a target before filtering
Separate pose estimation logic
Change getTurretAngle() to be CCW-positive
Remove doc comment parameter for removed parameter
Change ROBOT_CENTRIC_TURRET_CENTER to +X axis forward (intake side)
Remove unused startingPose
Ignore turret bias in pose estimation
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