Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
581 additions
and
1 deletion.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
236 changes: 236 additions & 0 deletions
236
conf/airframes/TUDELFT/tudelft_course2016_bebop_avoider.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
<!DOCTYPE airframe SYSTEM "../airframe.dtd"> | ||
|
||
<!-- And example airframe to be use in the TU DElft Course 2016 --> | ||
<airframe name="AvoiderBob"> <!-- The name of your airframe --> | ||
|
||
<firmware name="rotorcraft"> | ||
<target name="ap" board="bebop"/> <!-- The type of Autopilot board hardware one uses --> | ||
|
||
<!--define name="USE_SONAR" value="TRUE"/--> | ||
|
||
<!-- Subsystem section --> | ||
<module name="telemetry" type="transparent_udp"/> | ||
<module name="radio_control" type="datalink"/> <!-- We control the bebop through wifi --> | ||
<module name="motor_mixing"/> | ||
<module name="actuators" type="bebop"/> | ||
<module name="imu" type="bebop"/> | ||
<module name="gps" type="optitrack"/> <!-- The GPS information also comes over this wifi, as we are sitting in the cyberzoo all the time --> | ||
<module name="stabilization" type="indi_simple"/> | ||
<module name="ahrs" type="int_cmpl_quat"> | ||
<configure name="USE_MAGNETOMETER" value="FALSE"/> <!-- Heading is from Optitrack, in reguler outside flight case one would use and Magnetometer--> | ||
<define name="AHRS_USE_GPS_HEADING" value="TRUE"/> | ||
</module> | ||
<module name="ins" type="extended"/> | ||
</firmware> | ||
|
||
<!-- This is the place where you add all your modules --> | ||
<!-- If there is a variable you can define in your module you can add it within the load node--> | ||
<!-- Note that for vision the order in which modules are loaded is important --> | ||
<!-- If you place cv_colorfilter before your own module your own module will only get the filtered image--> | ||
<modules main_freq="512"> | ||
<module name="geo_mag"/> | ||
<module name="air_data"/> | ||
<module name="send_imu_mag_current"/> | ||
<!--module name="logger_file"> | ||
<define name="FILE_LOGGER_PATH" value="/data/ftp/internal_000"/> | ||
</module--> | ||
<module name="video_thread"> | ||
<define name="VIDEO_THREAD_FPS" value="4"/> | ||
<define name="VIDEO_THREAD_SHOT_PATH" value="/data/ftp/internal_000/images"/> | ||
</module> | ||
<!-- | ||
<module name="video_rtp_stream"> | ||
<define name="VIEWVIDEO_CAMERA" value="front_camera"/> | ||
<define name="VIEWVIDEO_QUALITY_FACTOR" value="80"/> | ||
<define name="VIEWVIDEO_DOWNSIZE_FACTOR" value="1"/> | ||
</module> | ||
--> | ||
<module name="cv_colorfilter"> | ||
<define name="COLORFILTER_CAMERA" value="front_camera"/> | ||
</module> | ||
<module name="orange_avoider"/> | ||
</modules> | ||
|
||
<commands> | ||
<axis name="PITCH" failsafe_value="0"/> | ||
<axis name="ROLL" failsafe_value="0"/> | ||
<axis name="YAW" failsafe_value="0"/> | ||
<axis name="THRUST" failsafe_value="6000"/> | ||
</commands> | ||
|
||
<servos driver="Default"> | ||
<servo name="TOP_LEFT" no="0" min="3000" neutral="3000" max="12000"/> | ||
<servo name="TOP_RIGHT" no="1" min="3000" neutral="3000" max="12000"/> | ||
<servo name="BOTTOM_RIGHT" no="2" min="3000" neutral="3000" max="12000"/> | ||
<servo name="BOTTOM_LEFT" no="3" min="3000" neutral="3000" max="12000"/> | ||
</servos> | ||
|
||
<section name="MIXING" prefix="MOTOR_MIXING_"> | ||
<!-- Time cross layout (X), with order NW (CW), NE (CCW), SE (CW), SW (CCW) --> | ||
<define name="TYPE" value="QUAD_X"/> | ||
</section> | ||
|
||
<command_laws> | ||
<call fun="motor_mixing_run(autopilot_motors_on,FALSE,values)"/> | ||
<set servo="TOP_LEFT" value="motor_mixing.commands[MOTOR_FRONT_LEFT]"/> | ||
<set servo="TOP_RIGHT" value="motor_mixing.commands[MOTOR_FRONT_RIGHT]"/> | ||
<set servo="BOTTOM_RIGHT" value="motor_mixing.commands[MOTOR_BACK_RIGHT]"/> | ||
<set servo="BOTTOM_LEFT" value="motor_mixing.commands[MOTOR_BACK_LEFT]"/> | ||
</command_laws> | ||
|
||
<section name="AIR_DATA" prefix="AIR_DATA_"> | ||
<define name="CALC_AIRSPEED" value="FALSE"/> | ||
<define name="CALC_TAS_FACTOR" value="FALSE"/> | ||
<define name="CALC_AMSL_BARO" value="TRUE"/> | ||
</section> | ||
|
||
<!-- The IMU calibration can be quite important --> | ||
<!-- Follow the MAVLab video to see how you can calibrate it --> | ||
<!-- If your drone tends to always go forward check your primary flight display --> | ||
<!-- Put the drone on a table, if the horizon is not perfectly straight you might want --> | ||
<!-- to adjust your body to imu variables until it is --> | ||
<section name="IMU" prefix="IMU_"> | ||
<!-- Magneto calibration --> | ||
<define name="MAG_X_NEUTRAL" value="18"/> | ||
<define name="MAG_Y_NEUTRAL" value="157"/> | ||
<define name="MAG_Z_NEUTRAL" value="49"/> | ||
<define name="MAG_X_SENS" value="10.5007722373" integer="16"/> | ||
<define name="MAG_Y_SENS" value="11.1147400462" integer="16"/> | ||
<define name="MAG_Z_SENS" value="11.6479371722" integer="16"/> | ||
|
||
<!-- Magneto current calibration --> | ||
<define name="MAG_X_CURRENT_COEF" value="0.0"/> | ||
<define name="MAG_Y_CURRENT_COEF" value="0.0"/> | ||
<define name="MAG_Z_CURRENT_COEF" value="0.0"/> | ||
|
||
<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> | ||
|
||
<!-- local magnetic field --> | ||
<!-- http://wiki.paparazziuav.org/wiki/Subsystem/ahrs#Local_Magnetic_Field --> | ||
<section name="AHRS" prefix="AHRS_"> | ||
<!-- values used if no GPS fix, on 3D fix is update by geo_mag module --> | ||
<!-- Delft, The Netherlands 2014 --> | ||
<define name="H_X" value="0.3892503"/> | ||
<define name="H_Y" value="0.0017972"/> | ||
<define name="H_Z" value="0.9211303"/> | ||
|
||
<!-- For vibrating airfames --> | ||
<define name="GRAVITY_HEURISTIC_FACTOR" value="0"/> | ||
</section> | ||
|
||
<section name="INS" prefix="INS_"> | ||
<define name="SONAR_MAX_RANGE" value="2.2"/> | ||
<define name="SONAR_UPDATE_ON_AGL" value="TRUE"/> | ||
</section> | ||
|
||
<section name="RC_SETPOINT" prefix="STABILIZATION_ATTITUDE_"> | ||
<!-- setpoint limits for attitude stabilization rc flight --> | ||
<define name="SP_MAX_PHI" value="45" unit="deg"/> | ||
<define name="SP_MAX_THETA" value="45" unit="deg"/> | ||
<define name="SP_MAX_R" value="100" unit="deg/s"/> | ||
<define name="DEADBAND_A" value="0"/> | ||
<define name="DEADBAND_E" value="0"/> | ||
<define name="DEADBAND_R" value="50"/> | ||
</section> | ||
|
||
<section name="ATTITUDE_REFERENCE" prefix="STABILIZATION_ATTITUDE_"> | ||
<!-- attitude reference generation model --> | ||
<define name="REF_OMEGA_P" value="450" unit="deg/s"/> | ||
<define name="REF_ZETA_P" value="0.9"/> | ||
<define name="REF_MAX_P" value="600." unit="deg/s"/> | ||
<define name="REF_MAX_PDOT" value="RadOfDeg(8000.)"/> | ||
|
||
<define name="REF_OMEGA_Q" value="450" unit="deg/s"/> | ||
<define name="REF_ZETA_Q" value="0.9"/> | ||
<define name="REF_MAX_Q" value="600." unit="deg/s"/> | ||
<define name="REF_MAX_QDOT" value="RadOfDeg(8000.)"/> | ||
|
||
<define name="REF_OMEGA_R" value="450" unit="deg/s"/> | ||
<define name="REF_ZETA_R" value="0.9"/> | ||
<define name="REF_MAX_R" value="600." unit="deg/s"/> | ||
<define name="REF_MAX_RDOT" value="RadOfDeg(8000.)"/> | ||
</section> | ||
|
||
<section name="STABILIZATION_ATTITUDE_INDI" prefix="STABILIZATION_INDI_"> | ||
<!-- control effectiveness --> | ||
<define name="G1_P" value="0.0639"/> | ||
<define name="G1_Q" value="0.0361"/> | ||
<define name="G1_R" value="0.0022"/> | ||
<define name="G2_R" value="0.1450"/> | ||
|
||
<!-- reference acceleration for attitude control --> | ||
<define name="REF_ERR_P" value="600.0"/> | ||
<define name="REF_ERR_Q" value="600.0"/> | ||
<define name="REF_ERR_R" value="600.0"/> | ||
<define name="REF_RATE_P" value="28.0"/> | ||
<define name="REF_RATE_Q" value="28.0"/> | ||
<define name="REF_RATE_R" value="28.0"/> | ||
|
||
<!--Maxium yaw rate, to avoid instability--> | ||
<define name="MAX_R" value="120.0"/> <!--deg/s--> | ||
|
||
<!-- second order filter parameters --> | ||
<define name="FILT_CUTOFF" value="8.0"/> | ||
<define name="FILT_CUTOFF_R" value="8.0"/> | ||
|
||
<!-- first order actuator dynamics --> | ||
<define name="ACT_DYN_P" value="0.1"/> | ||
<define name="ACT_DYN_Q" value="0.1"/> | ||
<define name="ACT_DYN_R" value="0.1"/> | ||
|
||
<!-- Adaptive Learning Rate --> | ||
<define name="USE_ADAPTIVE" value="FALSE"/> | ||
<define name="ADAPTIVE_MU" value="0.0001"/> | ||
</section> | ||
|
||
<section name="GUIDANCE_V" prefix="GUIDANCE_V_"> | ||
<define name="HOVER_KP" value="283"/> | ||
<define name="HOVER_KD" value="82"/> | ||
<define name="HOVER_KI" value="70"/> | ||
<define name="NOMINAL_HOVER_THROTTLE" value="0.5"/> | ||
<define name="ADAPT_THROTTLE_ENABLED" value="FALSE"/> | ||
</section> | ||
|
||
<section name="GUIDANCE_H" prefix="GUIDANCE_H_"> | ||
<define name="MAX_BANK" value="32" unit="deg"/> | ||
<define name="PGAIN" value="79"/> | ||
<define name="DGAIN" value="100"/> | ||
<define name="IGAIN" value="30"/> | ||
</section> | ||
|
||
<section name="NAVIGATION" prefix="NAV_"> | ||
<define name="CLIMB_VSPEED" value="1.0" /> | ||
<define name="DESCEND_VSPEED" value="-1.0" /> | ||
</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"/> | ||
</section> | ||
|
||
<!-- Here you put the modes that your drone can fly in --> | ||
<!-- If you are using a hobbyking joystick mode_manual and mode_auto2 have to be set--> | ||
<!-- These settings are probably ok for your project! --> | ||
<section name="AUTOPILOT"> | ||
<define name="MODE_STARTUP" value="AP_MODE_NAV"/> | ||
<define name="MODE_MANUAL" value="AP_MODE_ATTITUDE_DIRECT"/> | ||
<define name="MODE_AUTO1" value="AP_MODE_ATTITUDE_Z_HOLD"/> | ||
<define name="MODE_AUTO2" value="AP_MODE_NAV"/> | ||
<define name="NO_RC_THRUST_LIMIT" value="TRUE"/> | ||
</section> | ||
|
||
<section name="MISC"> | ||
<define name="NO_RC_THRUST_LIMIT" value="TRUE"/> | ||
</section> | ||
<section name="BAT"> | ||
<define name="MILLIAMP_AT_FULL_THROTTLE" value="8700"/> | ||
<define name="CATASTROPHIC_BAT_LEVEL" value="10.5" unit="V"/> | ||
<define name="CRITIC_BAT_LEVEL" value="10.8" unit="V"/> | ||
<define name="LOW_BAT_LEVEL" value="11.0" unit="V"/> | ||
<define name="MAX_BAT_LEVEL" value="12.4" unit="V"/> | ||
</section> | ||
</airframe> |
Oops, something went wrong.