Skip to content

Commit

Permalink
Bebops
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed Dec 14, 2023
1 parent 6f5df22 commit c0d49a5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 19 deletions.
18 changes: 12 additions & 6 deletions conf/airframes/tudelft/bebop_indi_actuators.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@
</module-->
</firmware>

<commands>
<commands><!-- Order must match the INDI ctrl_eff: INDI_NUM_ACT -->
<axis name="TOP_LEFT" failsafe_value="0"/>
<axis name="TOP_RIGHT" failsafe_value="0"/>
<axis name="BOTTOM_RIGHT" failsafe_value="0"/>
<axis name="BOTTOM_LEFT" failsafe_value="0"/>

<!-- default commands: can not be removed -->
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
Expand All @@ -60,10 +66,10 @@
</servos>

<command_laws>
<set servo="TOP_LEFT" value="autopilot_get_motors_on() ? actuators_pprz[0] : -MAX_PPRZ"/>
<set servo="TOP_RIGHT" value="autopilot_get_motors_on() ? actuators_pprz[1] : -MAX_PPRZ"/>
<set servo="BOTTOM_RIGHT" value="autopilot_get_motors_on() ? actuators_pprz[2] : -MAX_PPRZ"/>
<set servo="BOTTOM_LEFT" value="autopilot_get_motors_on() ? actuators_pprz[3] : -MAX_PPRZ"/>
<set servo="TOP_LEFT" value="autopilot_get_motors_on() ? @TOP_LEFT : -MAX_PPRZ"/>
<set servo="TOP_RIGHT" value="autopilot_get_motors_on() ? @TOP_RIGHT : -MAX_PPRZ"/>
<set servo="BOTTOM_RIGHT" value="autopilot_get_motors_on() ? @BOTTOM_RIGHT : -MAX_PPRZ"/>
<set servo="BOTTOM_LEFT" value="autopilot_get_motors_on() ? @BOTTOM_LEFT : -MAX_PPRZ"/>
</command_laws>

<section name="AIR_DATA" prefix="AIR_DATA_">
Expand Down Expand Up @@ -128,7 +134,7 @@
<define name="FILT_CUTOFF" value="5.0"/>

<!-- first order actuator dynamics -->
<define name="ACT_DYN" value="{0.1, 0.1, 0.1, 0.1}"/>
<define name="ACT_FREQ" value="{53.9, 53.9, 53.9, 53.9}"/>

<!-- Adaptive Learning Rate -->
<define name="USE_ADAPTIVE" value="TRUE"/>
Expand Down
18 changes: 12 additions & 6 deletions conf/airframes/tudelft/bebop_opticflow_indoor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@
</module>
</firmware>

<commands>
<commands><!-- Order must match the INDI ctrl_eff: INDI_NUM_ACT -->
<axis name="TOP_LEFT" failsafe_value="0"/>
<axis name="TOP_RIGHT" failsafe_value="0"/>
<axis name="BOTTOM_RIGHT" failsafe_value="0"/>
<axis name="BOTTOM_LEFT" failsafe_value="0"/>

<!-- default commands: can not be removed -->
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
Expand All @@ -81,10 +87,10 @@
</servos>

<command_laws>
<set servo="TOP_LEFT" value="autopilot_get_motors_on() ? actuators_pprz[0] : -MAX_PPRZ"/>
<set servo="TOP_RIGHT" value="autopilot_get_motors_on() ? actuators_pprz[1] : -MAX_PPRZ"/>
<set servo="BOTTOM_RIGHT" value="autopilot_get_motors_on() ? actuators_pprz[2] : -MAX_PPRZ"/>
<set servo="BOTTOM_LEFT" value="autopilot_get_motors_on() ? actuators_pprz[3] : -MAX_PPRZ"/>
<set servo="TOP_LEFT" value="autopilot_get_motors_on() ? @TOP_LEFT : -MAX_PPRZ"/>
<set servo="TOP_RIGHT" value="autopilot_get_motors_on() ? @TOP_RIGHT : -MAX_PPRZ"/>
<set servo="BOTTOM_RIGHT" value="autopilot_get_motors_on() ? @BOTTOM_RIGHT : -MAX_PPRZ"/>
<set servo="BOTTOM_LEFT" value="autopilot_get_motors_on() ? @BOTTOM_LEFT : -MAX_PPRZ"/>
</command_laws>

<section name="IMU" prefix="IMU_">
Expand Down Expand Up @@ -146,7 +152,7 @@
<define name="FILT_CUTOFF" value="5.0"/>

<!-- first order actuator dynamics -->
<define name="ACT_DYN" value="{0.1, 0.1, 0.1, 0.1}"/>
<define name="ACT_FREQ" value="{53.9, 53.9, 53.9, 53.9}"/>

<!-- Adaptive Learning Rate -->
<define name="USE_ADAPTIVE" value="FALSE"/>
Expand Down
18 changes: 12 additions & 6 deletions conf/airframes/tudelft/bebop_optitrack.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@
</module>
</firmware>

<commands>
<commands><!-- Order must match the INDI ctrl_eff: INDI_NUM_ACT -->
<axis name="TOP_LEFT" failsafe_value="0"/>
<axis name="TOP_RIGHT" failsafe_value="0"/>
<axis name="BOTTOM_RIGHT" failsafe_value="0"/>
<axis name="BOTTOM_LEFT" failsafe_value="0"/>

<!-- default commands: can not be removed -->
<axis name="PITCH" failsafe_value="0"/>
<axis name="ROLL" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
Expand All @@ -48,10 +54,10 @@
</servos>

<command_laws>
<set servo="TOP_LEFT" value="autopilot_get_motors_on() ? actuators_pprz[0] : -MAX_PPRZ"/>
<set servo="TOP_RIGHT" value="autopilot_get_motors_on() ? actuators_pprz[1] : -MAX_PPRZ"/>
<set servo="BOTTOM_RIGHT" value="autopilot_get_motors_on() ? actuators_pprz[2] : -MAX_PPRZ"/>
<set servo="BOTTOM_LEFT" value="autopilot_get_motors_on() ? actuators_pprz[3] : -MAX_PPRZ"/>
<set servo="TOP_LEFT" value="autopilot_get_motors_on() ? @TOP_LEFT : -MAX_PPRZ"/>
<set servo="TOP_RIGHT" value="autopilot_get_motors_on() ? @TOP_RIGHT : -MAX_PPRZ"/>
<set servo="BOTTOM_RIGHT" value="autopilot_get_motors_on() ? @BOTTOM_RIGHT : -MAX_PPRZ"/>
<set servo="BOTTOM_LEFT" value="autopilot_get_motors_on() ? @BOTTOM_LEFT : -MAX_PPRZ"/>
</command_laws>

<section name="IMU" prefix="IMU_">
Expand Down Expand Up @@ -120,7 +126,7 @@
<define name="FILT_CUTOFF" value="5.0"/>

<!-- first order actuator dynamics -->
<define name="ACT_DYN" value="{0.1, 0.1, 0.1, 0.1}"/>
<define name="ACT_FREQ" value="{53.9, 53.9, 53.9, 53.9}"/>

<!-- Adaptive Learning Rate -->
<define name="USE_ADAPTIVE" value="FALSE"/>
Expand Down
2 changes: 1 addition & 1 deletion conf/userconf/tudelft/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
telemetry="telemetry/highspeed_rotorcraft.xml"
flight_plan="flight_plans/tudelft/nederdrone_valkenburg.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/approach_moving_target.xml modules/eff_scheduling_nederdrone.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_indi_hybrid.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_ekf2.xml modules/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/nav_survey_rectangle_rotorcraft.xml modules/stabilization_indi.xml modules/target_pos.xml"
settings_modules="modules/air_data.xml modules/airspeed_ms45xx_i2c.xml modules/approach_moving_target.xml modules/eff_scheduling_nederdrone.xml modules/ekf_aw.xml modules/electrical.xml modules/gps.xml modules/gps_ublox.xml modules/guidance_indi_hybrid.xml modules/guidance_rotorcraft.xml modules/imu_common.xml modules/ins_ekf2.xml modules/logger_sd_chibios.xml modules/nav_hybrid.xml modules/nav_rotorcraft.xml modules/nav_survey_rectangle_rotorcraft.xml modules/stabilization_indi.xml modules/target_pos.xml"
gui_color="blue"
/>
<aircraft
Expand Down

0 comments on commit c0d49a5

Please sign in to comment.