-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Vision Subsystem #11
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
Conversation
| 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) { |
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.
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) { |
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.
The same applies here.
| } | ||
|
|
||
| private double getSeconds() { | ||
| return RobotController.getFPGATime(); |
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.
This returns microseconds. Need to divide by 1,000,000.
| } | ||
|
|
||
| // Filters | ||
| private boolean camsAgreeWithWheels(Translation3d pose, WallEyeResult result) { |
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.
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. |
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.
You are correct. This section does nothing and may be removed.
No description provided.