Mount: Invalid angle targets problem

Hi all
I am stuck with a problem that I can’t solve…
Running a copter on 4.5.0-beta2 with Mnt1 configured as a 1-axis pitch servo gimbal.
Mnt1 is working as it is stabilized when the copter is powered on and I have set pwm params & MNT1_PITCH_MIN/MAX to match the movements I want.

I am using Qgroundcontrol v4.3.0 on a android tablet with joystick as a GCS over a datalink.
In QGC i have setup the “button assignment” in the joystick setup to control Mnt1 and I have 3 functions bound to buttons, “Gimbal Up”, “Gimbal Down” & “Gimbal Center” .
When I press either Gimbal Up or Down button I get message “Warning: Mount: invalid angle targets” and gimbal does not respond to the commands however “Gimbal Center” function works.

Would really appreciate some input on what the issue might be or point me in the right direction.

Hi @Alexfmx,

Thanks for the report. I guess this also doesn’t work in earlier versions of AP (e.g. 4.4.x)?

I think the issue is probably a QGC bug where it is likely sending the target roll, pitch or yaw angles in centi-degrees instead of degrees.

I’ve added this to the 4.5 issues list and I’ll try and reproduce the issue but I suspect the fix will need to be made in QGC.

@rmackay9 you are correct it does not work in previous versions either.
I have tried stable down to 4.4.x as well as custom builds with deprecated MOUNT_CONTROL messages enabled as well as MAVLink CameraV2 support enabled but no joy.

When using mission planner I am able to control MNT1 but QGC does not.
I am using Navigator-tab3 as a controller and using QGC due to the android joystick support.

It makes sense what you said regarding centi-degrees vs degrees, if so I wonder if it just a small edit in the code and I could compile a custom QGC apk version with the change.

Anyway really appreciate any info/results you find

Thank you

Hi @Alexfmx,

I’ve tried to re-create but I’m not very familiar with QGC and I don’t think that the desktop version allows settings up buttons. I will have access to a Herelink in a couple of days but before then, if you tell me what autopilot you’re using I’ll create a debug build that will tell us what angles are being sent in. This way we can confirm that it’s using centi-degrees (or not).

@rmackay9
I am using a mRo ctrl0 F7 board
Also see QGC screenshot in the Joystick config section (should pickup windows vJOY device as joystick option and you could use a virtual joystick program to simulate.

In the Joystick button assignment is where the “gimbal Down” button is selected from the list of all available functions available for joystick button mapping.

Thanks

Any luck confirming centi-degrees with the custom build?

Hi @Alexfmx,

I was not able to get QGC’s joystick button presses to send any mavlink messages despite having set it up like your screen shot above.

Maybe you could try loading this Copter-4.6.0-dev version on your autopilot and then pushing the buttons to see what angle targets are set to?

Thanks @rmackay9
will test it tommorow and report back

@rmackay9, @Alexfmx: It’s QGC using centi-degrees: https://github.com/mavlink/qgroundcontrol/blob/master/src/Vehicle/Vehicle.cc#L4264

Called from here: https://github.com/mavlink/qgroundcontrol/blob/master/src/Joystick/Joystick.cc#L1090

1 Like

@nexton-winjeel Thank you for finding that.
Is this a bug in QGC? or just a function that does not exist yet?

Any advice on how to move forward?

Thank you all for the support

Hi @Alexfmx,

It’s a “bug” in QGC so I’ve raised an issue here. It’s a very simple fix but QGC doesn’t seem to be releasing stabler versions very often so who knows how long it will take to be released.

@Alexfmx: I’ve fixed the QGC bug here: Vehicle: Remove centi-degrees conversion in MOUNT_CONTROL by nexton-winjeel · Pull Request #11216 · mavlink/qgroundcontrol · GitHub

There should be an APK you can use one that finishes building. Go here: Vehicle: Remove centi-degrees conversion in MOUNT_CONTROL · mavlink/qgroundcontrol@e51e51a · GitHub

and look for the “Artifact download URL” in the “Upload Build File” section.

@nexton-winjeel Thank you so much will give it a try and report back.
Also @rmackay9 thank you for your efforts

2 Likes

@nexton-winjeel @rmackay9 With the custom QGC gimbal commands Up/Down works great!

Thank you so much for the help both of you

2 Likes