[conf] Added Iris. Iris_chibios and Lia chibios tests

This commit is contained in:
Michal Podhradsky
2017-02-23 11:25:31 -08:00
parent 4e5d863291
commit 40160f1279
4 changed files with 284 additions and 2 deletions
@@ -0,0 +1,238 @@
<!DOCTYPE airframe SYSTEM "../airframe.dtd">
<airframe name="Quadrotor Lia pwm">
<firmware name="rotorcraft">
<target name="ap" board="lia_1.1_chibios">
<module name="radio_control" type="sbus">
<configure name="SBUS_PORT" value="UART5"/>
</module>
</target>
<configure name="PERIODIC_FREQUENCY" value="160"/>
<target name="nps" board="pc">
<module name="fdm" type="jsbsim"/>
<module name="radio_control" type="spektrum"/>
<!--configure name="USE_HITL" value="1"/-->
<configure name="INS_DEV" value="/dev/ttyUSB1"/>
<configure name="INS_BAUD" value="B921600"/>
<configure name="AP_DEV" value="/dev/ttyUSB2"/>
<configure name="AP_BAUD" value="B921600"/>
</target>
<module name="stabilization" type="int_quat"/>
<module name="motor_mixing"/>
<module name="actuators" type="pwm">
<define name="SERVO_HZ" value="PERIODIC_FREQUENCY"/>
</module>
<module name="telemetry" type="transparent">
<configure name="MODEM_PORT" value="UART3"/>
<configure name="MODEM_BAUD" value="B57600"/>
</module>
<module name="ins" type="vectornav">
<configure name="VN_PORT" value="UART2"/>
<configure name="VN_BAUD" value="B921600"/>
</module>
<define name="GEOFENCE_DATALINK_LOST_TIME" value="45"/>
</firmware>
<modules>
<module name="sys_mon"/>
<module name="extra_dl">
<!-- in order to use uart1 without chibios we need to remap the peripheral-->
<define name="REMAP_UART1" value="TRUE"/>
<configure name="EXTRA_DL_PORT" value="UART1"/>
<configure name="EXTRA_DL_BAUD" value="B921600"/>
</module>
<module name="lidar_lite">
<configure name="LIDAR_LITE_I2C_DEV" value="i2c2"/>
</module>
<module name="battery_monitor.xml">
<define name="BATMON_CURRENT_OFFSET" value="-120"/>
<define name="BATMON_CURRENT_SENSITIVITY" value="25.6"/>
<define name="BATMON_TEMP_OFFSET" value="250"/>
<define name="BATMON_TEMP_SENSITIVITY" value="10"/>
</module>
</modules>
<servos driver="Pwm">
<servo name="FL" no="0" min="1000" neutral="1100" max="1900"/>
<servo name="FR" no="1" min="1000" neutral="1100" max="1900"/>
<servo name="BR" no="2" min="1000" neutral="1100" max="1900"/>
<servo name="BL" no="3" min="1000" neutral="1100" max="1900"/>
</servos>
<commands>
<axis name="ROLL" failsafe_value="0"/>
<axis name="PITCH" failsafe_value="0"/>
<axis name="YAW" failsafe_value="0"/>
<axis name="THRUST" failsafe_value="0"/>
</commands>
<section name="MIXING" prefix="MOTOR_MIXING_">
<!-- front left (CW), front right (CCW), back right (CW), back left (CCW) -->
<define name="TYPE" value="QUAD_X"/>
</section>
<command_laws>
<call fun="motor_mixing_run(autopilot_get_motors_on(),FALSE,values)"/>
<set servo="FL" value="motor_mixing.commands[MOTOR_FRONT_LEFT]"/>
<set servo="FR" value="motor_mixing.commands[MOTOR_FRONT_RIGHT]"/>
<set servo="BR" value="motor_mixing.commands[MOTOR_BACK_RIGHT]"/>
<set servo="BL" value="motor_mixing.commands[MOTOR_BACK_LEFT]"/>
</command_laws>
<section name="IMU" prefix="IMU_">
<define name="ACCEL_X_NEUTRAL" value="11"/>
<define name="ACCEL_Y_NEUTRAL" value="11"/>
<define name="ACCEL_Z_NEUTRAL" value="-25"/>
<!-- replace this with your own calibration -->
<define name="MAG_X_NEUTRAL" value="-179"/>
<define name="MAG_Y_NEUTRAL" value="-21"/>
<define name="MAG_Z_NEUTRAL" value="79"/>
<define name="MAG_X_SENS" value="4.17334785618" integer="16"/>
<define name="MAG_Y_SENS" value="3.98885954135" integer="16"/>
<define name="MAG_Z_SENS" value="4.40442339014" integer="16"/>
<define name="BODY_TO_IMU_PHI" value="0." unit="deg"/>
<define name="BODY_TO_IMU_THETA" value="0." unit="deg"/>
<define name="BODY_TO_IMU_PSI" value="0." unit="deg"/>
</section>
<section name="AHRS" prefix="AHRS_">
<!-- values used if no GPS fix, on 3D fix is update by geo_mag module -->
<define name="H_X" value="0.3770441"/>
<define name="H_Y" value="0.0193986"/>
<define name="H_Z" value="0.9259921"/>
</section>
<section name="STABILIZATION_RATE" prefix="STABILIZATION_RATE_">
<!-- setpoints -->
<define name="SP_MAX_P" value="140" unit="deg/s"/>
<define name="SP_MAX_Q" value="140" unit="deg/s"/>
<define name="SP_MAX_R" value="140" unit="deg/s"/>
<define name="DEADBAND_P" value="20"/>
<define name="DEADBAND_Q" value="20"/>
<define name="DEADBAND_R" value="200"/>
<!-- feedback -->
<define name="GAIN_P" value="800"/>
<define name="GAIN_Q" value="800"/>
<define name="GAIN_R" value="700"/>
<define name="IGAIN_P" value="240"/>
<define name="IGAIN_Q" value="240"/>
<define name="IGAIN_R" value="160"/>
</section>
<section name="STABILIZATION_ATTITUDE" prefix="STABILIZATION_ATTITUDE_">
<!-- setpoints -->
<define name="SP_MAX_PHI" value="45." unit="deg"/>
<define name="SP_MAX_THETA" value="45." unit="deg"/>
<define name="SP_MAX_R" value="90." unit="deg/s"/>
<define name="DEADBAND_A" value="0"/>
<define name="DEADBAND_E" value="0"/>
<define name="DEADBAND_R" value="250"/>
<!-- reference -->
<define name="REF_OMEGA_P" value="400" unit="deg/s"/>
<define name="REF_ZETA_P" value="0.85"/>
<define name="REF_MAX_P" value="400." unit="deg/s"/>
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_Q" value="400" unit="deg/s"/>
<define name="REF_ZETA_Q" value="0.85"/>
<define name="REF_MAX_Q" value="400." unit="deg/s"/>
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/>
<define name="REF_OMEGA_R" value="250" unit="deg/s"/>
<define name="REF_ZETA_R" value="0.85"/>
<define name="REF_MAX_R" value="180." unit="deg/s"/>
<define name="REF_MAX_RDOT" value="RadOfDeg(1800.)"/>
<!-- feedback -->
<define name="PHI_PGAIN" value="1000"/>
<define name="PHI_DGAIN" value="400"/>
<define name="PHI_IGAIN" value="200"/>
<define name="THETA_PGAIN" value="1000"/>
<define name="THETA_DGAIN" value="400"/>
<define name="THETA_IGAIN" value="200"/>
<define name="PSI_PGAIN" value="500"/>
<define name="PSI_DGAIN" value="300"/>
<define name="PSI_IGAIN" value="10"/>
<!-- feedforward -->
<define name="PHI_DDGAIN" value="300"/>
<define name="THETA_DDGAIN" value="300"/>
<define name="PSI_DDGAIN" value="300"/>
</section>
<section name="GUIDANCE_V" prefix="GUIDANCE_V_">
<define name="HOVER_KP" value="150"/>
<define name="HOVER_KD" value="80"/>
<define name="HOVER_KI" value="20"/>
<define name="NOMINAL_HOVER_THROTTLE" value="0.5"/>
<define name="ADAPT_THROTTLE_ENABLED" value="TRUE"/>
</section>
<section name="GUIDANCE_H" prefix="GUIDANCE_H_">
<define name="MAX_BANK" value="20" unit="deg"/>
<define name="USE_SPEED_REF" value="TRUE"/>
<define name="PGAIN" value="50"/>
<define name="DGAIN" value="100"/>
<define name="AGAIN" value="70"/>
<define name="IGAIN" value="20"/>
</section>
<section name="SIMULATOR" prefix="NPS_">
<define name="ACTUATOR_NAMES" value="nw_motor, ne_motor, se_motor, sw_motor" type="string[]"/>
<define name="JSBSIM_MODEL" value="simple_x_quad_ccw" type="string"/>
<define name="SENSORS_PARAMS" value="nps_sensors_params_default.h" type="string"/>
<!-- mode switch on joystick channel 5 (axis numbering starting at zero) -->
<define name="JS_AXIS_THROTTLE" value="0"/>
<define name="JS_AXIS_THROTTLE_REVERSED" value="1"/>
<define name="JS_AXIS_ROLL" value="1"/>
<define name="JS_AXIS_PITCH" value="2"/>
<define name="JS_AXIS_PITCH_REVERSED" value="1"/>
<define name="JS_AXIS_YAW" value="3"/>
<define name="JS_AXIS_YAW_REVERSED" value="1"/>
<define name="JS_AXIS_MODE" value="7"/>
</section>
<section name="AUTOPILOT">
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/>
<define name="MODE_AUTO1" value="AP_MODE_HOVER_Z_HOLD"/>
<define name="MODE_AUTO2" value="AP_MODE_NAV"/>
</section>
<section name="BAT">
<!-- Flight values -->
<!--
<define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="9.6" unit="V"/>
<define name="LOW_BAT_LEVEL" value="10.1" unit="V"/>
<define name="MAX_BAT_LEVEL" value="12.4" unit="V"/>
-->
<!-- Simulator values -->
<define name="MAX_BAT_LEVEL" value="5.0" unit="V" />
<define name="LOW_BAT_LEVEL" value="4.0" unit="V"/>
<define name="CRITIC_BAT_LEVEL" value="3.5" unit="V"/>
<define name="CATASTROPHIC_BAT_LEVEL" value="3.0" unit="V"/>
</section>
</airframe>
+11
View File
@@ -10,6 +10,17 @@
settings_modules="modules/battery_monitor.xml modules/lidar_lite.xml modules/gps.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml"
gui_color="#ffff954c0000"
/>
<aircraft
name="Ark_Quad_Lia"
ac_id="4"
airframe="airframes/AGGIEAIR/aggieair_ark_quad_lia.xml"
radio="radios/AGGIEAIR/aggieair_taranis.xml"
telemetry="telemetry/AGGIEAIR/aggieair_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic_geofence.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/battery_monitor.xml modules/lidar_lite.xml modules/gps.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml"
gui_color="#ffff954c0000"
/>
<aircraft
name="ECU"
ac_id="3"
@@ -12,7 +12,7 @@
<firmware name="rotorcraft">
<target name="ap" board="px4fmu_2.4" />
<target name="ap" board="px4fmu_2.4_chibios" />
<!-- amount of time it take for the bat to check -->
<!-- to avoid bat low spike detection when strong pullup withch draws short sudden power-->
@@ -115,7 +115,7 @@
<modules main_freq="512">
<!-- allow flashing FBW target through AP -->
<module name="px4_flash"/>
<!--module name="px4_flash"/-->
<!-- CPU utilization monitor -->
<module name="sys_mon"/>
+33
View File
@@ -65,6 +65,28 @@
settings_modules="modules/ahrs_int_cmpl_euler.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="Iris"
ac_id="67"
airframe="airframes/TUDELFT/tudelft_iris_indi.xml"
radio="radios/FrSky3dr.xml"
telemetry="telemetry/default_rotorcraft_slow.xml"
flight_plan="flight_plans/TUDELFT/tudelft_delft_basic.xml"
settings="settings/rotorcraft_basic.xml"
settings_modules="[modules/air_data.xml] modules/geo_mag.xml modules/ins_extended.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_indi_simple.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps_ubx_ucenter.xml modules/gps.xml modules/imu_common.xml"
gui_color="#ffffcccaccca"
/>
<aircraft
name="Iris_chibios"
ac_id="66"
airframe="airframes/AGGIEAIR/aggieair_iris_indi.xml"
radio="radios/AGGIEAIR/aggieair_FrSky3dr.xml"
telemetry="telemetry/AGGIEAIR/aggieair_iris.xml"
flight_plan="flight_plans/AGGIEAIR/rotorcraft_opticlow_test.xml"
settings="settings/rotorcraft_basic.xml [settings/test_actuators_pwm.xml]"
settings_modules="modules/air_data.xml modules/lidar_sf11.xml modules/lidar_lite.xml modules/px4flow_i2c.xml modules/ins_extended.xml modules/ahrs_float_mlkf.xml modules/ahrs_int_cmpl_quat.xml modules/stabilization_indi_simple.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/imu_common.xml"
gui_color="#337e387bffff"
/>
<aircraft
name="JP"
ac_id="6"
@@ -241,6 +263,17 @@
settings_modules="modules/gps_ubx_ucenter.xml modules/ahrs_float_cmpl_rmat.xml modules/stabilization_int_euler.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml modules/gps.xml modules/imu_common.xml"
gui_color="white"
/>
<aircraft
name="Quad_Lia_chibios"
ac_id="68"
airframe="airframes/AGGIEAIR/aggieair_ark_quad_lia.xml"
radio="radios/AGGIEAIR/aggieair_taranis.xml"
telemetry="telemetry/AGGIEAIR/aggieair_rotorcraft.xml"
flight_plan="flight_plans/rotorcraft_basic_geofence.xml"
settings="settings/rotorcraft_basic.xml settings/nps.xml"
settings_modules="modules/battery_monitor.xml modules/lidar_lite.xml modules/gps.xml modules/stabilization_int_quat.xml modules/nav_basic_rotorcraft.xml modules/guidance_rotorcraft.xml"
gui_color="#ffff954c0000"
/>
<aircraft
name="Quad_LisaMX"
ac_id="21"