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

send the camera centric positions of where we think the nodes are #101

Closed
wants to merge 2 commits into from

Conversation

varun7654
Copy link
Collaborator

No description provided.

@varun7654 varun7654 requested a review from ravzilla April 11, 2023 22:45
@@ -1035,9 +1035,6 @@ private void updateTeleopDrivingTarget(boolean recalculateGridPosition) {
} else {
// We're on the opposite side as our alliance
// Try to go to the pickup position
var predictedPoseForPickup = robotTracker.getLatestPose().getTranslation().plus(
robotTracker.getVelocity().times(0));

Choose a reason for hiding this comment

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

was this just unused?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah

yScoringOffsets
.get(isRedAlliance ? AllianceSide.RED : AllianceSide.BLUE)
.get(i)
.get(selectedPosition.getScoringDirection());

Choose a reason for hiding this comment

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

could you make me a picture of the field with the axes directions on the origin? I know you have told me multiple times but i keep forgetting
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

z points up

}

return redYs;
}

Choose a reason for hiding this comment

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

whats the deal with this change? a refactor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's the method we now call to get all the y-cords of the scoring positions so we can show them

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One of the methods this calls was unused so it wasn't updated to take the position offsets into account

var point = transformToCameraSpace(nodeLinePoints.get(i));
nodeLinePointsToSend[i * 3] = point.getX();
nodeLinePointsToSend[i * 3 + 1] = point.getY();
nodeLinePointsToSend[i * 3 + 2] = point.getZ();

Choose a reason for hiding this comment

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

can we not make a 2d array and flatten it? this code is fine, but ugly

@ravzilla ravzilla closed this Apr 30, 2023
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.

None yet

2 participants