Conversation
|
Uhh, spotless apply was already done D: |
|
Try rerunning and making sure the changes are committed and pushed, says spotless is still the issue |
|
@sophiep29 forgot to push 😭 |
|
lol alright I'll check over the code in a bit |
| public class Vision extends SubsystemBase {} | ||
| public class Vision extends SubsystemBase { | ||
| public static final PhotonCamera mainCamera = | ||
| new PhotonCamera(VisionConfig.MAIN_CAMERA_NAME); // Might be used for aprilTags? but I dunno |
There was a problem hiding this comment.
for main camera, just call it driver camera
| public static final PhotonPoseEstimator.PoseStrategy STRATEGY = | ||
| PhotonPoseEstimator.PoseStrategy.MULTI_TAG_PNP_ON_COPROCESSOR; | ||
| /* | ||
| //These are the previous year's camera locations. |
There was a problem hiding this comment.
you don't have to comment this out, just set those values to zero for now
There was a problem hiding this comment.
we will also need a driver camera position given that it will also be used for apriltag processing
There was a problem hiding this comment.
Should I leave the camera positions values zero for now? Or should I look at the cad and figure it out?
There was a problem hiding this comment.
Leave them at zero for now, they aren't in the CAD. We'll measure them when the cameras are on the robot.
| public static final String APRIL_LEFT_CAMERA_NAME = "aprilLeftCamera"; | ||
| public static final String APRIL_RIGHT_CAMERA_NAME = "aprilRightCamera"; | ||
|
|
||
| public static final double FIELD_LENGTH = Units.inchesToMeters(57); |
There was a problem hiding this comment.
the field is in feet, I'm not 100% sure if Units.feetToMeters exists so otherwise you'll have to multiply by 12
| public static final double FIELD_LENGTH = Units.inchesToMeters(57); | ||
| public static final double FIELD_WIDTH = Units.inchesToMeters(27); | ||
|
|
||
| public static final List<AprilTag> |
There was a problem hiding this comment.
yeah this should be good
|
|
||
| public static final List<AprilTag> | ||
| aprilTags = // Using a List.of, as it is immutable. Kinda redundant cus of the final keyword, | ||
| // but its probs fine |
There was a problem hiding this comment.
if you want you can get rid of these comments since you don't need them anymore
| new AprilTag( | ||
| 3, | ||
| new Pose3d( | ||
| new Translation3d( |
There was a problem hiding this comment.
btw, Translation3d here is unnecessary as Pose3d has an x, y, z, and rotation3d constructor but this works here too
| Units.inchesToMeters(46.0)), | ||
| new Rotation3d(0.0, 0.0, 180.0)))); | ||
|
|
||
| public static final AprilTagFieldLayout bunnyBotsFieldLayout = |
There was a problem hiding this comment.
generally we'd use this formatting: BUNNYBOTS_FIELD_LAYOUT
Added files and configs for vision subsystems