-
Notifications
You must be signed in to change notification settings - Fork 14.6k
gz: fix gimbal yaw, add dds publisher #25754
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
Conversation
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 480 byte (0.02 %)]
px4_fmu-v6x [Total VM Diff: 480 byte (0.02 %)]
Updated: 2025-10-14T18:50:20 |
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
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.
@dakejahl , in
matrix::Quatf q_yaw_correction = matrix::Quatf(cosf(yaw_offset / 2), 0, 0, sinf(yaw_offset / 2));
matrix::Quatf q_gimbal_FLU = q_yaw_correction * q_gimbal_FLU_raw;
_q_gimbal = q_FLU_to_FRD * q_gimbal_FLU * q_FLU_to_FRD.inversed();
you're computing
_q_gimbal = q_FLU_to_FRD * q_yaw_correction * q_gimbal_FLU_raw * q_FLU_to_FRD.inversed();
There q_FLU_to_FRD * q_yaw_correction
is a ENU to NED rotation so I pushed a simplified version of the formula.
Would you be able to test it please?
Nevertheless, the PR looks goods, if you prefer to keep your version feel free to force push it, I'll approve straight away
@beniaminopozzan thank you for the simplification! I just tested and it works the same as before |
In conjunction with PX4/PX4-gazebo-models#122
context
Support for using x500_gimbal in our px4-ros2 precision landing example.