Skip to content

Conversation

@mwitcpalek
Copy link
Contributor

No description provided.

double dist1 = Math.abs(camHeights[camIndex] - pose1.getZ());
double dist2 = Math.abs(camHeights[camIndex] - pose2.getZ());
// This filters out results by seeing if they are the height of the robot.
if (dist1 < dist2 && dist1 < VisionConstants.kRobotHeight && dist1 > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

dist1 < VisionConstants.kRobotHeight && dist1 > 0 should probably be pose1.getZ() < VisionConstants.kRobotHeight && pose1.getZ() > 0. Depending on how close camHeights[camIndex] is to kRobotHeight or the ground, I feel like those conditions may not be necessary because pose1.getZ() may naturally fall out of that range while the pose may still be useful.

if (dist1 < dist2 && dist1 < VisionConstants.kRobotHeight && dist1 > 0) {
return pose1;
}
if (dist2 < dist1 && dist2 < VisionConstants.kRobotHeight && dist2 > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The same applies here.

}

private double getSeconds() {
return RobotController.getFPGATime();
Copy link
Contributor

Choose a reason for hiding this comment

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

This returns microseconds. Need to divide by 1,000,000.

}

// Filters
private boolean camsAgreeWithWheels(Translation3d pose, WallEyeResult result) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Type should be WallEyeTagResult

logger.recordOutput("Vision/Rejected Cam", centerPose);
}
} else if (res.getFirst() instanceof WallEyeTagResult) {
// I don't know what it does. I don't it does anything. But be careful about deletion.
Copy link
Contributor

Choose a reason for hiding this comment

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

You are correct. This section does nothing and may be removed.

@mwitcpalek mwitcpalek closed this Apr 12, 2025
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.

5 participants