-
Notifications
You must be signed in to change notification settings - Fork 46
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 #982
Conversation
}) | ||
.orElse(false); | ||
}); | ||
public Trigger atPose(Optional<Pose2d> pose, double toleranceMeters, double toleranceRadians) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this an optional? seems kinda leaky of the underlying implementation.
@@ -259,8 +259,48 @@ public static Supplier<Optional<Pose2d>> optionalFlipped( | |||
* @return empty if the alliance is empty; the original pose if the alliance is blue; the flipped | |||
* pose if the alliance is red | |||
*/ | |||
public static Supplier<Optional<Pose2d>> optionalFlipped( | |||
public static Supplier<Optional<Pose2d>> optionalFlippedPose2d( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these optionals are confusing me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Renamed atPose() triggers as atTranslation(), added new atPose() that requires rotation tolerance as well.
Fixed logic in those triggers that sampled an alliance-dependent pose too early
Made the triggers and(active()).