mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-06 02:52:42 +08:00
Introducing several changes to the control stask for the stabilization: - new structures: stabilization, stab (att and/or rates) and thrust (vector) - more functional approach: stabilization receives the stab and thrust setpoints from guidance and fill command vector at the end - modes and sub-modes are redefined (split stab and guidance modes), some AP modes are removed (FLIP and MODULE) - RC read functions are removed and replaced by ABI bindings, one for each part (AP, stab, guidance_h, guidance_v) with dedicated functions - transition ratio (float in [0-1]) replace transition_percentage (int) - the AP_MODULE mode is replaced by generated autopilot - the ABI hack for guidance indi is not needed anymore - AP generator supports a new 'store' attribute to use return values of functions - cleaning of the stabilization API (for setter functions)
53 lines
2.9 KiB
XML
53 lines
2.9 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="opticflow_hover" dir="guidance_opticflow">
|
|
<doc>
|
|
<description>
|
|
Hovers the drone based on optical flow made for Linux video Devices.
|
|
|
|
Computes Pitch- and roll attitude from downward looking camera looking at a textured floor.
|
|
- Sonar is required.
|
|
- Another module sending the VELOCITY_ESTIMATE ABI message (usually computed from optic flow) is required.
|
|
- Controller can hold position
|
|
</description>
|
|
|
|
<!-- Satbilization parameters and gains -->
|
|
<section name="VISION" prefix="VISION_">
|
|
<define name="PHI_PGAIN" value="400" description="Optic flow proportional gain on the roll velocity error"/>
|
|
<define name="PHI_IGAIN" value="20" description="Optic flow integrated gain on the summed roll velocity error"/>
|
|
<define name="THETA_PGAIN" value="400" description="Optic flow proportional gain on the pitch velocity error"/>
|
|
<define name="THETA_IGAIN" value="20" description="Optic flow integrated gain on the summed pitch velocity error"/>
|
|
<define name="DESIRED_VX" value="0" description="The desired velocity in the body frame x direction"/>
|
|
<define name="DESIRED_VY" value="0" description="The desired velocity in the body frame y direction"/>
|
|
</section>
|
|
</doc>
|
|
|
|
<settings>
|
|
<dl_settings NAME="Vision stabilization">
|
|
<!-- Satabilization loop parameters and gains -->
|
|
<dl_settings name="vision_stab">
|
|
<dl_setting var="opticflow_stab.phi_pgain" module="guidance_opticflow/guidance_opticflow_hover" min="0" step="1" max="10000" shortname="kp_v_phi" param="VISION_PHI_PGAIN"/>
|
|
<dl_setting var="opticflow_stab.phi_igain" module="guidance_opticflow/guidance_opticflow_hover" min="0" step="1" max="1000" shortname="ki_v_phi" param="VISION_PHI_IGAIN"/>
|
|
<dl_setting var="opticflow_stab.theta_pgain" module="guidance_opticflow/guidance_opticflow_hover" min="0" step="1" max="10000" shortname="kp_v_theta" param="VISION_THETA_PGAIN"/>
|
|
<dl_setting var="opticflow_stab.theta_igain" module="guidance_opticflow/guidance_opticflow_hover" min="0" step="1" max="1000" shortname="ki_v_theta" param="VISION_THETA_IGAIN"/>
|
|
<dl_setting var="opticflow_stab.desired_vx" module="guidance_opticflow/guidance_opticflow_hover" min="-5" step="0.01" max="5" shortname="desired_vx" param="VISION_DESIRED_VX"/>
|
|
<dl_setting var="opticflow_stab.desired_vy" module="guidance_opticflow/guidance_opticflow_hover" min="-5" step="0.01" max="5" shortname="desired_vy" param="VISION_DESIRED_VY"/>
|
|
</dl_settings>
|
|
</dl_settings>
|
|
</settings>
|
|
|
|
<dep>
|
|
<depends>cv_opticflow|px4flow</depends>
|
|
</dep>
|
|
|
|
<header>
|
|
<file name="guidance_opticflow_hover.h"/>
|
|
</header>
|
|
<init fun="guidance_opticflow_hover_init()"/>
|
|
<makefile>
|
|
<file name="guidance_opticflow_hover.c"/>
|
|
<test firmware="rotorcraft"/>
|
|
</makefile>
|
|
|
|
</module>
|