Skip to content
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

Idea to apply offset to camera transform 3d so that it can be more accurate in doing turning #119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maxspier
Copy link
Member

@maxspier maxspier commented Apr 5, 2024

No description provided.

return GrayScaleCamera.getBestTargetTransform3d(toUse.getTrackedTargetWithID(tagId));
Transform3d current =
GrayScaleCamera.getBestTargetTransform3d(toUse.getTrackedTargetWithID(tagId));
Transform3d offset = new Transform3d(0.0, -0.229, 0.0, new Rotation3d());
Copy link
Member

Choose a reason for hiding this comment

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

this number is highly magical.

why this particular value? where did it come from?

does this work if the robot is turning in either direction?

Copy link
Member Author

Choose a reason for hiding this comment

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

This value comes from my "measurement" of the camera's position to the middle of the bumper. I say "measurement" as I used wills fingers to measure so we should get something more accurate. This should work in all test cases since it moves the camera to the middle. It should have no impact on other things (or so I think).

Copy link
Contributor

Choose a reason for hiding this comment

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

back then I recall we also have to rotate along a certain axis so that we compensate for the camera tilt

you should test (maybe unit tests or some logs) to see if the resultant coordinates make sense

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.

3 participants