Skip to content

Commit

Permalink
hybrid quadplanes and tailsitters explicit (#3161)
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed Nov 6, 2023
1 parent 4d88bb9 commit 54d2a2b
Show file tree
Hide file tree
Showing 19 changed files with 354 additions and 206 deletions.
2 changes: 1 addition & 1 deletion conf/airframes/examples/cube_orange.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<configure name="USE_TFMINI_AGL" value="FALSE"/>
</module-->

<module name="guidance" type="indi_hybrid">
<module name="guidance" type="indi_hybrid_tailsitter">
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="GUIDANCE_INDI_POS_GAIN" value="0.2"/>
<define name="GUIDANCE_INDI_SPEED_GAIN" value="1.0"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/airframes/tudelft/bebop2_indi_convergence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<module name="gps" type="ublox"/>
<module name="gps" type="ubx_ucenter"/>
<module name="stabilization" type="indi_simple"/>
<module name="guidance" type="indi_hybrid"/>
<module name="guidance" type="indi_hybrid_tailsitter"/>

<module name="ins" type="ekf2"/>
<!--<module name="ahrs" type="int_cmpl_quat">-->
Expand Down
2 changes: 1 addition & 1 deletion conf/airframes/tudelft/cyfoam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
<define name="WLS_N_U" value="4" />
<define name="WLS_N_V" value="4" />
</module>
<module name="guidance" type="indi_hybrid">
<module name="guidance" type="indi_hybrid_tailsitter">
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="GUIDANCE_INDI_POS_GAIN" value="0.2"/>
<define name="GUIDANCE_INDI_SPEED_GAIN" value="1.0"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/airframes/tudelft/disco_rotorcraft_indi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<define name="WLS_N_V" value="4"/>
<configure name="INDI_NUM_ACT" value="3"/>
</module>
<module name="guidance" type="indi_hybrid"/>
<module name="guidance" type="indi_hybrid_tailsitter"/>
<!--<module name="sonar_bebop">
<define name="USE_SONAR"/>
<define name="SENSOR_SYNC_SEND_SONAR"/>
Expand Down
3 changes: 2 additions & 1 deletion conf/airframes/tudelft/nederdrone4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@
<define name="GUIDANCE_H_USE_REF" value="FALSE"/>
</module>

<module name="guidance" type="indi_hybrid">
<module name="guidance" type="indi_hybrid_tailsitter">
<define name="GUIDANCE_INDI_HYBRID_USE_WLS" value="TRUE"/>
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="GUIDANCE_INDI_POS_GAIN" value="0.3"/>
<define name="GUIDANCE_INDI_SPEED_GAIN" value="0.5"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/airframes/tudelft/nederdrone6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<define name="GUIDANCE_H_USE_REF" value="FALSE"/>
</module>

<module name="guidance" type="indi_hybrid">
<module name="guidance" type="indi_hybrid_tailsitter">
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="GUIDANCE_INDI_POS_GAIN" value="0.3"/>
<define name="GUIDANCE_INDI_SPEED_GAIN" value="0.5"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/airframes/tudelft/nederdrone7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<define name="GUIDANCE_H_USE_REF" value="FALSE"/>
</module>

<module name="guidance" type="indi_hybrid">
<module name="guidance" type="indi_hybrid_tailsitter">
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="GUIDANCE_INDI_POS_GAIN" value="0.3"/>
<define name="GUIDANCE_INDI_SPEED_GAIN" value="0.5"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/airframes/tudelft/nederdrone8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<define name="GUIDANCE_H_USE_REF" value="FALSE"/>
</module>

<module name="guidance" type="indi_hybrid">
<module name="guidance" type="indi_hybrid_tailsitter">
<define name="GUIDANCE_INDI_RC_DEBUG" value="FALSE"/>
<define name="GUIDANCE_INDI_POS_GAIN" value="0.3"/>
<define name="GUIDANCE_INDI_SPEED_GAIN" value="0.5"/>
Expand Down
3 changes: 1 addition & 2 deletions conf/airframes/tudelft/rot_wing_25kg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

<module name="ctrl_eff_sched_rot_wing"/>

<module name="guidance" type="indi_hybrid"/>
<module name="guidance" type="indi_hybrid_quadplane"/>
<module name="nav_hybrid"/>

<!-- Other -->
Expand Down Expand Up @@ -409,7 +409,6 @@
<define name="PITCH_LIFT_EFF" value="0.0"/>
<define name="ZERO_AIRSPEED" value="TRUE"/>

<define name="QUADPLANE" value="TRUE"/>
<define name="THRUST_Z_EFF" value="-0.0023"/>
<define name="THRUST_X_EFF" value="0.00055"/>

Expand Down
7 changes: 4 additions & 3 deletions conf/modules/guidance_indi_hybrid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<module name="guidance_indi_hybrid" dir="guidance" task="control">
<doc>
<description>
Guidance controller for hybrids using INDI
Common guidance controller code for hybrids using INDI: in your airframe file include one of the options:
- guidance_indi_hybid_tailsitter
- guidance_indi_hybid_quadplane
</description>
<section name="GUIDANCE_INDI_HYBRID" prefix="GUIDANCE_INDI_HYBRID_">
<define name="USE_WLS" value="FALSE|TRUE" description="use WLS allocation instead of matrix inversion (default: FALSE)"/>
Expand Down Expand Up @@ -31,14 +33,13 @@
</settings>
<dep>
<depends>@navigation,guidance_rotorcraft,wls</depends>
<provides>guidance,attitude_command</provides>
<suggests>guidance_indi_hybrid_tailsitter</suggests>
</dep>
<header>
<file name="guidance_indi_hybrid.h"/>
</header>
<init fun="guidance_indi_init()"/>
<init fun="guidance_indi_enter()"/>
<!--<periodic fun="guidance_indi_propagate_filters()" freq="PERIODIC_FREQUENCY" autorun="TRUE"/>-->
<makefile target="ap|nps" firmware="rotorcraft">
<file name="guidance_indi_hybrid.c" dir="$(SRC_FIRMWARE)/guidance"/>
<define name="GUIDANCE_INDI_HYBRID" value="TRUE"/>
Expand Down
27 changes: 27 additions & 0 deletions conf/modules/guidance_indi_hybrid_quadplane.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE module SYSTEM "module.dtd">

<module name="guidance_indi_hybrid_quadplane" dir="guidance" task="control">
<doc>
<description>
Guidance controller for hybrid quadplane vehicles
</description>
</doc>
<dep>
<depends>guidance_indi_hybrid</depends>
<conflicts>guidance_indi_hybrid_tailsitter</conflicts>
<provides>guidance,attitude_command</provides>
</dep>
<header>
<file name="guidance_indi_hybrid_quadplane.h"/>
</header>
<init fun="guidance_indi_quadplane_init()"/>
<periodic fun="guidance_indi_quadplane_propagate_filters()" freq="PERIODIC_FREQUENCY" autorun="TRUE"/>
<makefile target="ap|nps" firmware="rotorcraft">
<define name="GUIDANCE_INDI_HYBRID_USE_WLS" value="1"/>
<!-- Guidance actuators: (roll, pitch, thrust, push) for quadplanes -->
<define name="GUIDANCE_INDI_HYBRID_U" value="4"/>
<!-- Guidance control objectives: ax, ay, ay for quadplanes -->
<define name="GUIDANCE_INDI_HYBRID_V" value="3"/>
<file name="guidance_indi_hybrid_quadplane.c" dir="$(SRC_FIRMWARE)/guidance"/>
</makefile>
</module>
24 changes: 24 additions & 0 deletions conf/modules/guidance_indi_hybrid_tailsitter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE module SYSTEM "module.dtd">

<module name="guidance_indi_hybrid_tailsitter" dir="guidance" task="control">
<doc>
<description>
Guidance controller for hybrid tailsitter vehicles
</description>
</doc>
<dep>
<depends>guidance_indi_hybrid</depends>
<conflicts>guidance_indi_hybrid_quadplane</conflicts>
<provides>guidance,attitude_command</provides>
</dep>
<header>
<file name="guidance_indi_hybrid_tailsitter.h"/>
</header>
<makefile target="ap|nps" firmware="rotorcraft">
<!-- Guidance actuators: (roll, pitch, thrust, push) for quadplanes -->
<define name="GUIDANCE_INDI_HYBRID_U" value="3"/>
<!-- Guidance control objectives: ax, ay, ay for quadplanes -->
<define name="GUIDANCE_INDI_HYBRID_V" value="3"/>
<file name="guidance_indi_hybrid_tailsitter.c" dir="$(SRC_FIRMWARE)/guidance"/>
</makefile>
</module>
2 changes: 2 additions & 0 deletions conf/modules/nav_hybrid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
<define name="DOWNLINK_TRANSPORT" value="pprz_tp"/>
<define name="DOWNLINK_DEVICE" value="uart0"/>
<define name="USE_UART0"/>
<define name="GUIDANCE_INDI_HYBRID_U" value="3"/>
<define name="GUIDANCE_INDI_HYBRID_V" value="3"/>
</test>
</makefile>
</module>

0 comments on commit 54d2a2b

Please sign in to comment.