Rotation problem in the YAGSL simulation

Hello, I am trying to try the YAGSL project example and when trying the aimAtSpeaker and driveToPose methods, even if they change position, their rotation does not change, they return to the initial rotation.

EXAMPLE VIDEO

how can I solve this ? :blush:

1 Like

To solve this letโ€™s understand how the function is supposed to work.

We get the Pose2d relative to the AprilTag pose. Thede poses are blue-origin so if youโ€™re on the red side it might not work

hello thank you for the answer. as seen in the video, the robot goes to the correct rotation exactly as I want, but after reaching the target rotation, it returns to the rotation it left before.

Oh good! This is bc you have to hold that rotation or make your own drive command to rotate to it and drive at the same time.

1 Like