Skip to content

feat: add AllianceTranslation class and restore Intake initialization#16

Open
YehudaRothstein wants to merge 1 commit intomasterfrom
detached2
Open

feat: add AllianceTranslation class and restore Intake initialization#16
YehudaRothstein wants to merge 1 commit intomasterfrom
detached2

Conversation

@YehudaRothstein
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 5, 2026 12:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an alliance-aware wrapper for Translation2d (similar to the existing AlliancePose) and adjusts the AlliancePose API surface.

Changes:

  • Introduced AllianceTranslation to convert Translation2d coordinates based on current alliance.
  • Removed the AlliancePose(double degrees) constructor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 86 to 90
public AlliancePose(Translation2d translation, Rotation2d rotation) {
this.pose = new Pose2d(translation, rotation);
}

public AlliancePose(double degrees) {
this.pose = new Pose2d(0, 0, Rotation2d.fromDegrees(degrees));
}

public Pose2d get() {
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

AlliancePose(double degrees) was removed. Since AlliancePose is public, removing a public constructor is a source/binary breaking API change for any downstream consumers. If this wasn’t intentional, consider restoring it (or keeping it as a deprecated overload that delegates to the existing constructors).

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +111
private final Translation2d translation2d;

public AllianceTranslation(double x, double y) {
this.translation2d = new Translation2d(x, y);
}

public AllianceTranslation() {
this.translation2d = new Translation2d();
}

public AllianceTranslation(Translation2d translation) {
this.translation2d = translation;
}

public Translation2d get() {
return toAlliancePose(translation2d);
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

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

In AllianceTranslation, the field name translation2d is redundant with the type and inconsistent with AlliancePose's pose field naming. Renaming it to something like translation would improve readability and reduce noise in later usage.

Suggested change
private final Translation2d translation2d;
public AllianceTranslation(double x, double y) {
this.translation2d = new Translation2d(x, y);
}
public AllianceTranslation() {
this.translation2d = new Translation2d();
}
public AllianceTranslation(Translation2d translation) {
this.translation2d = translation;
}
public Translation2d get() {
return toAlliancePose(translation2d);
private final Translation2d translation;
public AllianceTranslation(double x, double y) {
this.translation = new Translation2d(x, y);
}
public AllianceTranslation() {
this.translation = new Translation2d();
}
public AllianceTranslation(Translation2d translation) {
this.translation = translation;
}
public Translation2d get() {
return toAlliancePose(translation);

Copilot uses AI. Check for mistakes.
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