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

Improve atPose clarity, routine-active safety, alliance-flipping safety #981

Closed
wants to merge 1 commit into from

Conversation

shueja
Copy link
Collaborator

@shueja shueja commented Dec 6, 2024

The existing methods don't check rotation. TODO: add atPose that checks rotation

Also reorganize these to better handle alliance-dependent poses.

Makes AutoTrajectory.allianceFlipped(Optional<Pose2d>) and `allianceFlipped(Pose2d)' public.

@shueja shueja changed the title Rename atPose to atTranslation Improve atPose clarity, routine-active safety, alliance-flipping safety Dec 6, 2024

private Supplier<Optional<Pose2d>> optionalFlipped(Optional<Pose2d> pose) {
return AllianceFlipUtil.optionalFlipped(pose, alliance, useAllianceFlipping);
public Trigger atTranslationFlipped(Pose2d pose, double toleranceMeters) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think u should rename "atTranslationFlipped" to "atTranslation" and "atTranslation" to "atAbsoluteTranslation";
most of the time, people want the pose to be flipped.

For it's namesake, an atTranslation(Translation2d) overload should exist too.

@shueja shueja closed this Dec 7, 2024
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