|
From: | Gautier Hattenberger |
Subject: | Re: [Paparazzi-devel] Create a new control subsystem |
Date: | Wed, 12 Jun 2013 17:55:48 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 |
Hello Bruno, There is unfortunately no guide to write a new control loop (updates to the wiki are welcome!). What you need to do (for attitude control, but it works the same with guidance control loops) is to implement the function in firmwares/rotorcraft/stabilization/stabilization_attitude.h, where the run function holds the control law itself (most of the function names are self explaining, but ask if your lost). The output is the stabilization_cmd vector that you can find in firmwares/rotorcraft/stabilization.h In order to compile and use it, you have to make a subsystem makefile in firmwares/subsystems/rotorcraft (similar to stabilization_int_euler.makefile) and then call it in your airframe with <subsystem name="stabilization" type="your_new_type"/>. The input of this stabilization layer are stab_att_ref_<euler or quat, rate, accel> if you are using the reference (a second order filter on direct input, RC or guidance). Or you can directly use stab_att_sp_<euler or quat> if you don't want this filter. I hope it helps you a little, Regards, Gautier Le 12/06/2013 09:06, bruno jouvencel a écrit : Hi |
[Prev in Thread] | Current Thread | [Next in Thread] |