Skip to content

Commit

Permalink
Rotating wing state machine (#3169)
Browse files Browse the repository at this point in the history
* Rotating wing state machine
* state now drives the wing rotation
* module does not run stand-alone
* Update conf/modules/rotwing_state.xml

Co-authored-by: Dennis van Wijngaarden <D.C.vanWijngaarden@tudelft.nl>
Co-authored-by: Gautier Hattenberger <gautier.hattenberger@enac.fr>
  • Loading branch information
3 people committed Nov 11, 2023
1 parent 5c04a35 commit 0ec27e7
Show file tree
Hide file tree
Showing 6 changed files with 759 additions and 35 deletions.
24 changes: 24 additions & 0 deletions conf/modules/rotwing_state.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="rotwing_state" dir="rot_wing_drone">
<doc>
<description>This module keeps track of the current state of a rotating wing drone and desired state set by the RC or flightplan. Paramters are being scheduled in each change of a current state and desired state. Functions are defined in this module to call the actual state and desired state and set a desired state.</description>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="RotWingState">
<dl_setting var="rotwing_state_skewing.wing_angle_deg_sp" min="0" step="1" max="90" shortname="skew angle"/>
<dl_setting var="rotwing_state_skewing.force_rotation_angle" min="0" step="1" max="1" values="FALSE|TRUE" shortname="force_skew"/>
<dl_setting var="hover_motors_active" min="0" step="1" max="1" values="FALSE|TRUE" shortname="h_motors_active"/>
<dl_setting var="bool_disable_hover_motors" min="0" step="1" max="1" values="FALSE|TRUE" shortname="h_motors_disable"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="rotwing_state.h"/>
</header>
<init fun="init_rotwing_state()"/>
<periodic fun="periodic_rotwing_state()" freq="50"/>
<makefile>
<file name="rotwing_state.c"/>
</makefile>
</module>
2 changes: 0 additions & 2 deletions conf/modules/wing_rotation_controller_servo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<settings>
<dl_settings NAME="wing_rotation">
<dl_settings NAME="wing_rot">
<dl_setting MAX="90" MIN="0" STEP="1" VAR="wing_rotation_controller.wing_angle_deg_sp" shortname="wing_sp_deg"/>
<dl_setting MAX="0.01" MIN="0" STEP="0.0001" VAR="wing_rotation_controller.wing_rotation_first_order_dynamics" shortname="first_dyn"/>
<dl_setting MAX="0.01" MIN="0" STEP="0.0001" VAR="wing_rotation_controller.wing_rotation_second_order_dynamics" shortname="second_dyn"/>
</dl_settings>
Expand All @@ -16,7 +15,6 @@
<file name="wing_rotation_controller_servo.h"/>
</header>
<init fun="wing_rotation_init()"/>
<periodic fun="wing_rotation_periodic()" freq="1.0"/>
<periodic fun="wing_rotation_event()"/>
<makefile>
<configure name="ADC_CHANNEL_WING_ROTATION_CONTROLLER_POSITION" default="ADC_5" case="lower|upper"/>
Expand Down

0 comments on commit 0ec27e7

Please sign in to comment.