Camera Gimbal function in APM

Hi,

I just updated my rover to the new RT raspbian image and the newest APMrover.elf.
I used a new SD card, so I can keep everything on the other one.
I saved the APM settings and loaded them to the new installation with MissionPlanner.
Everything is working, except for the camera gimbal output.
I have connected the servos to PWM outputs 5 and 6.
In MissionPlanner, outputs 5 and 6 show 0us.
I changed one servo to output 4 and set it up as gimbal_pan and as soon as I saved it, output 4 also showed 0us in MissionPlanner.
Setting outputs 5 and 6 to passthrough gets the servos working again, but without any stabilisation of course.

Sebastian,

I was able to reproduce this issue, we will find out why it happens and I will update this thread.

Thanks!

Sebastian,

Please try setting:

MNT_TYPE = 1

It might take effect only after restart of APMrover2

Sorry for not posting the results.
The gimbal is working now with mnt_type=1.

Hi Igor,

I have the same issue here, no gimbal function from APMrover. APMrover version 2.48 latest i believe.
Same issue as Sebastian had but I cannot seem to fix the issue.

I use APM Planner 2.0.15
Not sure if I totally understand all the settings.
I can set the gimball options in one tab but also can set all standard parameters in the other tab, not sure what influences what

On the initial setup page my camera gimball looks like attached ss

On the standard parameter page I can set the mnt_type but i have no numbers but a drop down box.
first option is ‘servo’ so i hope you mean that with mnt_type=1 ? could you confirm?

Like Sebastian if i out servo output to passthrue the gimbal works on the RC commands, but indeed no stabilization etc…

What should be the setting for the servo_out? If I read the command below it I guess ‘disabled’ but i ttried also mount_pan/tilt on both without luck.
See ss

Then there are also the MNT_STAB_xxx settings what to do with these?

I tried al lot of combi’s but no luck … thx for any comments

hugo

Hi Hugo,

your settings look to be right. The problem seems to be the gimbal setup page does not set the mnt_type. So setup the gimbal on this page and then set the mnt_type to 1 in the full parameter list.
mnt_stab_xxx are the stabilisation settings for the different axes.

So basically set the channels where your servos are connected,
set the input channels, if you want to control the gimbal from your rc transmitter,
then activate stabilisation for tilt axis (stabilisation for pan does strange things on my rover),
switch to the full parameter list and set mnt_type to 1,
restart APM:rover.
Now you should be able to move the gimbal with your transmitter and it should move if you tilt your rover.
If the gimbal tilts up if you pitch your rover up, you need to reverse your tilt axis.
If your gimbal has mechanical endpoints, other than the servo endpoints, you need to set the min/max PWM values, so the servos/gimbal do not hit the stops.
Otherwise you can just set it to 800-2200 to get the maximum travel.
The last step would be to set the angle limits, to match pitch angles of your vehicle to the servo angles.
Give maximum/minimum tilt input and enter the angles the gimbal reaches into the max/min angle fields.

I hope you get your gimbal working!

hi Sebastian,

thx for your answer, question, in APMPlanner i have no option to set MNT_TYPE to the number ‘1’ … I have options like “None” or “Servo” or “Mav_link” and some other ones two i believe.

My guess is that MNT_TYPE = 1 in Mission Planner is equivalent to MNT_TYPE=Servo in APM Planner…?

Could you confirm this?

thx

hugo

You have to set APMplanner to advanced mode in the file menu to access the full parameter list. There you should be able to set mnt_type to 1.
I just tested setting up the gimbal with APMplanner and I can only recommend to only use the full parameter list to get it going. The camera gimbal page does strange things, like not displaying the actual values, not updating the settings after changing them etc.

great, thx for pointing me to the advnced mode and the full parameter list.

good news: MNT_TYPE=1 + restart APMrover got stuff working!
bad news not sure what is working now. indeed the gimbal page itself seems erratic

now roll seems to work no tilt no pan i will run past all settings to check.

ok seems APM Planner acts really strange. espacially playing with RC5_FUNCTION shows really strange mappings…

the way I understand is that for this parameter the following holds:
in full parameter list
0:disable
1: passthrue

5: pan
6: tilt
7: rol

but when i try to put this rc5function into 7 it acts as if it handles the camera trigger , putting in to 10 (camera trigger) does nothng…

I am going to update APM planner…

ok updated to planner 2.0.17 still the same.
what i did now is put all settings to default or 0 made a dump of the parameters.
used the gimbal page ONLY once, this seemed to work for TILTT and ROLL

made a dump of the parameters again and compared the differences avoila:

MNT_RC_IN_ROLL 6
MNT_RC_IN_TILT 5
MNT_STAB_ROLL 1
MNT_STAB_TILT 1
RC5_FUNCTION 7
RC6_FUNCTION 8

I cannot get the PAN function to work but maybe that makes no sense for a Rover…?

I will look at my values in mission planner later. Do you really have a 3 axis gimbal?
Pan is yaw for a gimbal so it makes a lot of sense for a rover. In my opinion roll is the axis that is less important. It only matters if you want to have smooth video, but does not help much looking around.

indeed, you are correct, so mi issue remains that I am not able to get PAN to work… If i select ROLL it all works but that is not what i need…

really strange that all works ok on ROLL but if i try for PAN it does not…?

EDIT: I have the PAN function working but it only moves in a very small range of the set up angles… it is setup as the rest from -45…45 degrees but only moves in a 5 degree range left of centre…

What is also strange is that now i have the PAN function working seems TILT now stabilizes on ROLL …?!@#$$#@??? really strange

thinking about an omnivision 360 view setup now… that is better for ROS later…
see here for an example

In my opinion roll is the axis that is less important. It only matters if you want to have smooth video, but does not help much looking around. I used this article to find my best Gimbal for iPhone 13.