If I'm not mistaken they should now be effectively half of
the previous gains in the case of pwm_actuators and
stabilization quat_int. The assumption is that the commands were
previously from -200 to 200 and I changed them to
-MAX_PPRZ,MAX_PPRZ, so 9600/200 = 48
48 is what I set the new gain scale in the
stabilization_attitude_quat_int for... but there also was a
GAIN_SCALE of 2 in actuators_pwm_supervision which I got rid
off in the process...
but I'm not sure if the commands really had a range of 200
in the pwm_supervision case.
In case of the stabilitzation_euler_int I set a new
CMD_SHIFT to 11 instead of 16, so effectively the gain
prescaler is now only 32 times as high as before (instead of
48). But I thought it would be better to set them lower
instead of changing CMD_SHIFT to 10 and effectively setting
the prescaler 64 times as high.
So I guess we maybe should set a multiplier just like in
stabilization quat instead of using only a shift (to be able
to set it to 48) as well....
But I guess what the best solution would be is to set the
gain scales in both cases to such a value that the same
commands and gains result in the same final actuator commands.
In an ideal case there would be no need to change the gains
at all if you e.g. switch from stabilization euler to quat.
This would need some further calculation of what result you
get with which gains, adjusting the gain scales accordingly
and of course more testing. But I think that would be best
way....
@Gautier, Christophe & co... what do you think?
Cheers, Felix
On Wed, Mar 28, 2012 at 2:16 PM, Luke
Barnett
<address@hidden>
wrote:
Hi Felix,
I'll test this out and let you know how I get on. With
regards to the gains, do you have an idea of the expected
change for PWM actuators to the gain values that I have
already?
Thanks
Luke
Hi,
I merged
pull request 169 into the
dev branch, which means that you will have to
re-tune your control gains if you are using the
rotorcraft firmware.
This was necessary in order to properly
support all kinds of actuators with different
ranges without having to resort to hacks and
having to set different gains for different
actuators.
Now PWM actuators should also work nicely
regardless of what stop/min/max values the
controllers expect and adaptive hover should be
fixed with that as well.
If you are using pwm_supervision actuators,
you also need to configure the value to send to
the controllers to stop the motors (before that
was fixed to 1000us, but that doesn't fit for
every controller):
- cleaned up rotorcraft stabilization and
guidance
- removed not properly functioning nav
tracking algorithm
- same guidance loop for hover and nav
(except that nav uses a reference)
- horizontal guidance (hover, nav) should
now be running properly for quaternion
stabilization as well
If you have comments, questions or a setup to
test this, feedback is always welcome :-)
Cheers, Felix
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel