Skip to content

Object detection -> master#271

Open
rys4590 wants to merge 23 commits into
masterfrom
object-detection
Open

Object detection -> master#271
rys4590 wants to merge 23 commits into
masterfrom
object-detection

Conversation

@rys4590

@rys4590 rys4590 commented Jun 25, 2026

Copy link
Copy Markdown

I hate snakes

image

@rys4590

rys4590 commented Jun 25, 2026

Copy link
Copy Markdown
Author

currently the object-relative-to-camera math isnt working but object detection is soooooooooo

Comment on lines +137 to +152
double objectRelativeToCameraX = getCameraRelativeObjectX(
robotRelativeCameraPose,
DetectedObjectType.FUEL.getCenterHeightFromFloorMeters() * THREE_FOURTHS_OBJECT_FACTOR,
pitchOffset
);

double objectRelativeToCameraY = getCameraRelativeObjectY(
robotRelativeCameraPose,
DetectedObjectType.FUEL.getCenterHeightFromFloorMeters() * THREE_FOURTHS_OBJECT_FACTOR,
yawOffset,
objectRelativeToCameraX
);

Translation2d objectRelativeToCamera = new Translation2d(objectRelativeToCameraX, objectRelativeToCameraY);
Translation2d objectRelativeToField = objectRelativeToCamera.rotateBy(robotRelativeCameraPose.getRotation().toRotation2d());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why don't you use ObjectDetectionMath.getDetectedObjectObservation()?

Comment on lines +41 to +42
private final Rotation2d horizontalFOV;
private final Rotation2d verticalFOV;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unused


private static final int THROTTLE_ENABLE_VALUE = 200;
private static final int THROTTLE_DISABLE_VALUE = 0;
private static final double THREE_FOURTHS_OBJECT_FACTOR = 1.5;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image

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.

2 participants