-
Notifications
You must be signed in to change notification settings - Fork 2
Cargo tracker #92
base: main
Are you sure you want to change the base?
Cargo tracker #92
Conversation
@NotNull AxisAngle4d robotRotation, @NotNull Vector3d cameraPosition, | ||
@NotNull ArrayList<CargoPosition> cargoPositions) { | ||
for (Vector3d detectedCargoPosition : detectedCargoPositions) { | ||
INTAKE_CAMERA_ROTATION.transform(robotRotation.transform(detectedCargoPosition)).add(cameraPosition); |
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.
is detected cargo position in the intake camera reference frame? if that is true shouldnt you be applying these in reverse order to get the field relative position:
cargo_wrt_field = robotRotation ^-1.transform(intake_camera_rotation^-1.transform(detectedCargoPosition) - cameraPosition)
maybe i am misunderstanding what is going on here
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.
Does the order we apply the rotations really matter? They're on their own axis's. Also, we shouldn't we add the cameraPosition to make the position relative to the field? (I changed the name of cameraPosition to cameraPositionRelativeToField to make it clearer what it is.)
I don't think we want to find the inverse of the robot rotation, right?
Create a system to track the position of cargo
https://gist.github.com/varun7654/3adedeabc6b6b8d2e3db46b01a2d6266