Skip to content

[Bug] Gimbal simulator applies Euler angles incorrectly #25257

@teapfw

Description

@teapfw

Describe the bug

I believe the application of Euler angles is incorrect with the simulated gimbal. According to the SDF file, the order of rotations is yaw, roll, and then pitch. This seems fairly standard with 3-axis gimbals. It corresponds to a ZXY or 312 intrinsic convention. However, the conversion from quaternion to Euler angles in GZGimbal.cpp uses the ZYX or 321 convention per Euler.hpp. I haven't tested extensively, but I would expect this to produce unexpected results.

To Reproduce

No response

Expected behavior

No response

Screenshot / Media

No response

Flight Log

No response

Software Version

No response

Flight controller

No response

Vehicle type

None

How are the different components wired up (including port information)

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions