-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Gimbal: add angular rate test and fix deg/rad input #23476
Conversation
bb3d57e
to
bceb669
Compare
Probably should have merged this months ago... |
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.
Nice, makes sense
@@ -568,5 +618,6 @@ Test the output by setting a angles (all omitted axes are set to 0): | |||
PRINT_MODULE_USAGE_ARG("<sysid> <compid>", "MAVLink system ID and MAVLink component ID", false); | |||
PRINT_MODULE_USAGE_COMMAND_DESCR("test", "Test the output: set a fixed angle for one or multiple axes (gimbal must be running)"); | |||
PRINT_MODULE_USAGE_ARG("roll|pitch|yaw <angle>", "Specify an axis and an angle in degrees", false); | |||
PRINT_MODULE_USAGE_ARG("rollrate|pitchrate|yawrate <angle rate>", "Specify an axis and an angle rate in degrees / second", false); |
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.
module docs ci fails to extract the yawrate
here.
We should make sure this split
also splits by space: https://github.com/PX4/PX4-Autopilot/blob/main/Tools/px4moduledoc/srcparser.py#L445
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.
Thanks, I don't quite understand why but it seems to fix the issue indeed :).
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.
It's a simple consistency check that parses the module docs and tries to ensure all parsed arguments in the code are actually documented.
bceb669
to
2721994
Compare
This is handy to test angular rate input, not just angles.
The command is in degrees, but the rest in radians. Also, set roll to NAN, rather than 0 when not set.
A gimbal user needs to be able to receive gimbal device messages such as GIMBAL_DEVICE_INFORMATION. Therefore, we need to forward this MAVLink instance.
This is required in the case where there are 3 commands on one line.
2721994
to
26f6a07
Compare
This adds a test to test angular rate input, not just angles.
Also, this fixes MAVLink angular rate input which is in degrees but needs conversion to radians.
At least this second part should probably be backported to v1.15.
Also, make sure to forward gimbal traffic in SITL as it is required for proper discovery of a MAVLink gimbal.
Tested in SITL using typhoon_h480 model