Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/frc/robot/vision/cameras/limelight/Limelight.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,17 @@ public List<DetectedObjectObservation> getRobotRelativeColorDetections() {
return new ArrayList<>();
}

public static Pose2d calculateRobotCenterRelativeToField(
Supplier<Pose2d> limeLightPoseRelativeToRobotCenter,
Pose2d limeLightPoseRelativeToField
) {
Transform2d camTransformRelativeToRobotCenter = new Transform2d(
new Pose2d(0, 0, Rotation2d.fromDegrees(0.0)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
new Pose2d(0, 0, Rotation2d.fromDegrees(0.0)),
new Pose2d(0, 0, new Rotation2d()),

limeLightPoseRelativeToRobotCenter.get()
);
return (limeLightPoseRelativeToField.transformBy(camTransformRelativeToRobotCenter.inverse()));
}

Comment on lines +215 to +225

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is the camera only moving in 2d space?

public Function<LimelightHelpers.RawDetection, Boolean> getNeuralDetectionFilter() {
return neuralDetectionFilter;
}
Expand Down