|
From: | Jorn Anke |
Subject: | [Paparazzi-devel] Lisa/M2, Aspirin2.2, problem compiling for simulation |
Date: | Wed, 27 Feb 2013 23:50:37 +0100 |
@ Felix, Thanks for the hints and help with my setup so far! Now I have all the hardware up and running, and everything is looking good. Altitude hasn't moved for an hour of bench testing, so it seems like even the baro is working (-or has frozen the altitude in the gcs). ;-) The only problem I am facing at the moment is I can't compile for any of the simulation targets without errors. Error message copy/pasted below. So, I have a few questions again; 1. How can I remove the sim compilation errors? 2. I did use the default settings for the Aspirin 2.1 IMU - (for my Aspirin 2.2), found here; https://github.com/psinha/paparazzi/blob/toytronics/conf/airframes/esden/calib/asp21-default.xml Should this be ok? (I noticed you had changed some of the settings in the quad-copter airframe file you were referencing yesterday). 3. I have until now disabled the internal compass. Partly because I don't know how I can transfer the local declination/inclination into settings for the IMU, and partly because I do not think I need the compass for my fixed-wing Skywalker. Any views on this? 4. Any reason for not taking the Lisa for a flight test in the near future? Cheers Jorn _______________ Error message ______________________ RUN 'make -C /home/jorn/paparazzi -f Makefile.ac AIRCRAFT=My_Lisa_Skywalker sim ' make: Entering directory `/home/jorn/paparazzi' My_Lisa_Skywalker BUILD My_Lisa_Skywalker, TARGET sim make[1]: Entering directory `/home/jorn/paparazzi' BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/generated/airframe.h ################################################## AIRFRAME MODEL: My_Lisa_Skywalker ################################################## BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/generated/modules.h Module gps_ubx unloaded, target sim not supported BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/generated/periodic_telemetry.h BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/generated/settings.h BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/generated/autopilot_core.h make[1]: Leaving directory `/home/jorn/paparazzi' make[1]: Entering directory `/home/jorn/paparazzi' BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/generated/radio.h ################################################## RADIO MODEL: FASST TX Module ################################################## make[1]: Leaving directory `/home/jorn/paparazzi' make[1]: Entering directory `/home/jorn/paparazzi' BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/generated/flight_plan.h ################################################## FLIGHT PLAN: Basic ################################################## Warning: low altitude (185<185+25) in <waypoint NAME="TD" Y="57.0" X="28.8" ALT="185.0"/> BUILD /home/jorn/paparazzi/var/My_Lisa_Skywalker/flight_plan.xml make[1]: Leaving directory `/home/jorn/paparazzi' cd sw/airborne; make TARGET=sim ARCHI=sim ARCH=sim all make[1]: Entering directory `/home/jorn/paparazzi/sw/airborne' DEPEND /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/.depend make[1]: Leaving directory `/home/jorn/paparazzi/sw/airborne' make[1]: Entering directory `/home/jorn/paparazzi/sw/airborne' CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/mcu.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/mcu_arch.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/led_hw.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/mcu_periph/sys_time.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/mcu_periph/sys_time_arch.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/./inter_mcu.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/math/pprz_geodetic_int.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/math/pprz_geodetic_float.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/math/pprz_geodetic_double.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/math/pprz_trig_int.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/math/pprz_orientation_conversion.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/mcu_periph/i2c.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/mcu_periph/i2c_arch.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/main_fbw.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/electrical.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/commands.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/actuators.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/fbw_downlink.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/main_ap.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/autopilot.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/ap_downlink.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/state.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/settings.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/subsystems/settings_arch.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/sim_ap.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/datalink/downlink.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/datalink.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/sim_gps.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/ivy_transport.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/sim_adc_generic.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/sim_ahrs.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/sim_ir.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/radio_control.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/radio_control/ppm.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/arch/sim/subsystems/radio_control/ppm_arch.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/stabilization/stabilization_attitude.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/firmwares/fixedwing/guidance/guidance_v.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/ahrs.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/ahrs/ahrs_sim.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/gps.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/gps/gps_sim.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/nav.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/navigation/common_flight_plan.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/navigation/traffic_info.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/navigation/nav_survey_rectangle.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/navigation/nav_line.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/ins.o CC /home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/ins/ins_int.o subsystems/ins/ins_int.c:46:21: fatal error: nps_fdm.h: No such file or directory compilation terminated. make[1]: *** [/home/jorn/paparazzi/var/My_Lisa_Skywalker/sim/subsystems/ins/ins_int.o] Error 1 make[1]: Leaving directory `/home/jorn/paparazzi/sw/airborne' make: *** [sim] Error 2 make: Leaving directory `/home/jorn/paparazzi' FAILED 'make -C /home/jorn/paparazzi -f Makefile.ac AIRCRAFT=My_Lisa_Skywalker sim' with code 2 _____________________ airframe file _______________________ <!DOCTYPE airframe SYSTEM "../airframe.dtd"> <!-- this is a Skywalker * Autopilot: Lisa/M 2.0 http://paparazzi.enac.fr/wiki/Lisa/M_v20 * IMU: Aspirin 2.2 http://paparazzi.enac.fr/wiki/AspirinIMU * GPS: Ublox http://paparazzi.enac.fr/wiki/Subsystem/gps * RC: any PPM system http://paparazzi.enac.fr/wiki/Subsystem/radio_control#PPM * Modem XBee in transparent mode at 57600 baud --> <airframe name="Skywalker LisaM 2.0"> <firmware name="fixedwing"> <target name="ap" board="lisa_m_2.0"> <!-- higher frequency for aspirin imu, ouputs data at 100Hz --> <configure name="LISA_M_BARO" value="BARO_MS5611_SPI"/> <configure name="PERIODIC_FREQUENCY" value="120"/> <configure name="AHRS_PROPAGATE_FREQUENCY" value="100"/> <configure name="AHRS_CORRECT_FREQUENCY" value="100"/> <define name="AHRS_TRIGGERED_ATTITUDE_LOOP"/> </target> <target name="sim" board="pc"/> <target name="nps" board="pc"> <subsystem name="fdm" type="jsbsim"/> <subsystem name="radio_control" type="ppm"/> </target> <define name="ALT_KALMAN"/> <define name="USE_MAGNETOMETER" value="FALSE"/> <subsystem name="radio_control" type="ppm"/> <subsystem name="telemetry" type="transparent"/> <subsystem name="control"/> <subsystem name="imu" type="aspirin_v2.2"/> <subsystem name="ahrs" type="float_dcm"/> <subsystem name="gps" type="ublox"/> <subsystem name="navigation"/> <subsystem name="ins"/> </firmware> <!-- commands section --> <servos> <servo name="THROTTLE" no="1" min="1000" neutral="1000" max="2000"/> <servo name="ELEVATOR" no="2" min="1900" neutral="1500" max="1100"/> <servo name="RUDDER" no="3" min="900" neutral="1350" max="1800"/> <servo name="AILERON_RIGHT" no="4" min="900" neutral="1500" max="2100"/> <servo name="AILERON_LEFT" no="5" min="900" neutral="1500" max="2100"/> </servos> <commands> <axis name="THROTTLE" failsafe_value="0"/> <axis name="ROLL" failsafe_value="0"/> <axis name="PITCH" failsafe_value="0"/> <axis name="YAW" failsafe_value="0"/> <axis name="BRAKE" failsafe_value="9600"/> <!-- both elerons up as butterfly brake ? --> </commands> <rc_commands> <set command="THROTTLE" value="@THROTTLE"/> <set command="ROLL" value="@ROLL"/> <set command="YAW" value="@YAW"/> <set command="PITCH" value="@PITCH"/> <set command="BRAKE" value="@FLAPS"/> </rc_commands> <section name="SERVO_MIXER_GAINS"> <define name="AILERON_NEUTRAL" value="0.3f"/> <define name="AILERON_RATE_UP" value="1.0f"/> <define name="AILERON_RATE_DOWN" value="0.5f"/> <define name="AILERON_RATE_UP_BRAKE" value="1.0f"/> <define name="AILERON_RATE_DOWN_BRAKE" value="1.0f"/> <define name="PITCH_GAIN" value="0.9f"/> <define name="BRAKE_AILEVON" value="-0.7f"/> <define name="BRAKE_PITCH" value="0.1f"/> <define name="MAX_BRAKE_RATE" value="130"/> <define name="RUDDER_OF_AILERON" value="0.3"/> </section> <!-- New settings pr. 20. jan. 2013 --> <command_laws> <!-- Brake Rate Limiter --> <let var="brake_value_nofilt" value="Chop(address@hidden, 0, MAX_PPRZ)"/> <ratelimit var="brake_value" value="$brake_value_nofilt" rate_min="-MAX_BRAKE_RATE" rate_max="MAX_BRAKE_RATE" /> <!-- Differential Aileron Depending on Brake Value --> <let var="aileron_up_rate" value="(AILERON_RATE_UP * (MAX_PPRZ - $brake_value)) + (AILERON_RATE_UP_BRAKE * $brake_value)"/> <let var="aileron_down_rate" value="(AILERON_RATE_DOWN * (MAX_PPRZ - $brake_value)) + (AILERON_RATE_DOWN_BRAKE * $brake_value)"/> <let var="aileron_up" value="((address@hidden) * (((float)$aileron_up_rate) / ((float)MAX_PPRZ)))"/> <let var="aileron_down" value="((address@hidden) * (((float)$aileron_down_rate) / ((float)MAX_PPRZ)))"/> <let var="leftturn" value="(@ROLL >= 0? 0 : 1)"/> <let var="rightturn" value="(1 - $leftturn)"/> <set servo="AILERON_LEFT" value="($aileron_up * $leftturn) + ($aileron_down * $rightturn) - $brake_value*(BRAKE_AILEVON) - (MAX_PPRZ * AILERON_NEUTRAL)"/> <set servo="AILERON_RIGHT" value="($aileron_up * $rightturn) + ($aileron_down * $leftturn) + $brake_value*(BRAKE_AILEVON) + (MAX_PPRZ *AILERON_NEUTRAL)"/> <set servo="RUDDER" value="-(@YAW + @ROLL * RUDDER_OF_AILERON)"/> <set servo="THROTTLE" value="@THROTTLE"/> <!-- Pitch with Brake-Trim Function --> <set servo="ELEVATOR" value="@PITCH * PITCH_GAIN - BRAKE_PITCH * $brake_value"/> </command_laws> <section name="AUTO1" prefix="AUTO1_"> <define name="MAX_ROLL" value="60.0" unit="deg"/> <define name="MAX_PITCH" value="45.0" unit="deg"/> </section> <section name="IMU" prefix="IMU_"> <!-- My settings for orienting Lisa M2 in the flight direction --> <define name="BODY_TO_IMU_PHI" value="0.0" unit="deg"/> <define name="BODY_TO_IMU_THETA" value="0.0" unit="deg"/> <define name="BODY_TO_IMU_PSI" value="270.0" unit="deg"/> <!-- Default Aspirin V2.1 values based on the datasheet --> <!-- Copy/paste from: https://github.com/psinha/paparazzi/blob/toytronics/conf/airframes/esden/calib/asp21-default.xml --> <!-- Calibration Neutral --> <define name="GYRO_P_NEUTRAL" value="0"/> <define name="GYRO_Q_NEUTRAL" value="0"/> <define name="GYRO_R_NEUTRAL" value="-7"/> <!--SENS = 16.4 LSB/(deg/sec) * 57.6 deg/rad = 939.650 LSB/rad/sec / 12bit FRAC: 4096 / 939.65 --> <define name="GYRO_P_SENS" value="4.359" integer="16"/> <define name="GYRO_Q_SENS" value="4.359" integer="16"/> <define name="GYRO_R_SENS" value="4.359" integer="16"/> <define name="ACCEL_X_NEUTRAL" value="0"/> <define name="ACCEL_Y_NEUTRAL" value="0"/> <define name="ACCEL_Z_NEUTRAL" value="0"/> <define name="ACCEL_X_SENS" value="4.92297204167" integer="16"/> <define name="ACCEL_Y_SENS" value="4.88255070466" integer="16"/> <define name="ACCEL_Z_SENS" value="4.86606505696" integer="16"/> <define name="MAG_X_NEUTRAL" value="0"/> <define name="MAG_Y_NEUTRAL" value="0"/> <define name="MAG_Z_NEUTRAL" value="0"/> <define name="MAG_X_SENS" value="1" integer="16"/> <define name="MAG_Y_SENS" value="1" integer="16"/> <define name="MAG_Z_SENS" value="1" integer="16"/> </section> <section name="INS" prefix="INS_"> <define name="ROLL_NEUTRAL_DEFAULT" value="0" unit="deg"/> <define name="PITCH_NEUTRAL_DEFAULT" value="0" unit="deg"/> <define name="BARO_SENS" value="22.3" integer="16"/> </section> <section name="BAT"> <!-- <define name="MILLIAMP_AT_FULL_THROTTLE" value="20000" unit="mA"/> --> <define name="CATASTROPHIC_BAT_LEVEL" value="9.0" unit="V"/> <define name="CRITIC_BAT_LEVEL" value="9.5" unit="V"/> <define name="LOW_BAT_LEVEL" value="10.0" unit="V"/> <define name="MAX_BAT_LEVEL" value="12.5" unit="V"/> </section> <section name="MISC"> <define name="NOMINAL_AIRSPEED" value="14." unit="m/s"/> <define name="CARROT" value="5." unit="s"/> <define name="CONTROL_FREQUENCY" value="60" unit="Hz"/> <!-- Ny parameter satt inn 17.09.2012 --> <define name="NAV_RADIUS" value="50" unit="m"/> <!-- XBEE kommentert ut 19.02.2013 (433MHz moduler)--> <!-- <define name="XBEE_INIT" value=""ATPL2\rATRN5\rATTT80\r""/> --> <!-- v<define name="ALT_KALMAN_ENABLED" value="TRUE"/> --> <define name="DEFAULT_CIRCLE_RADIUS" value="50."/> <define name="GLIDE_AIRSPEED" value="10"/> <define name="GLIDE_VSPEED" value="3."/> <define name="GLIDE_PITCH" value="45" unit="deg"/> <define name="COMMAND_ROLL_TRIM" value="180"/> <define name="COMMAND_PITCH_TRIM" value="-194."/> </section> <section name="VERTICAL CONTROL" prefix="V_CTL_"> <define name="POWER_CTL_BAT_NOMINAL" value="11.1" unit="volt"/> <!-- outer loop proportional gain --> <define name="ALTITUDE_PGAIN" value="0.108000002801"/> <!-- outer loop saturation --> <define name="ALTITUDE_MAX_CLIMB" value="2."/> <!-- auto throttle inner loop --> <define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.43599998951"/> <define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.25"/> <define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.549000024796"/> <define name="AUTO_THROTTLE_LOITER_TRIM" value="1500"/> <define name="AUTO_THROTTLE_DASH_TRIM" value="-4000"/> <define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.158000007272" unit="%/(m/s)"/> <define name="AUTO_THROTTLE_PGAIN" value="0."/> <define name="AUTO_THROTTLE_IGAIN" value="0."/> <define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.361000001431"/> <define name="THROTTLE_SLEW_LIMITER" value="2" unit="s"/> </section> <section name="HORIZONTAL CONTROL" prefix="H_CTL_"> <define name="COURSE_PGAIN" value="0.972000002861"/> <define name="COURSE_DGAIN" value="0.280999988317"/> <define name="COURSE_PRE_BANK_CORRECTION" value="1.0039999485"/> <define name="ROLL_MAX_SETPOINT" value="0.851999998093" unit="radians"/> <define name="PITCH_MAX_SETPOINT" value="0.5" unit="radians"/> <define name="PITCH_MIN_SETPOINT" value="-0.5" unit="radians"/> <define name="PITCH_PGAIN" value="16917.2929688"/> <define name="PITCH_DGAIN" value="7.73400020599"/> <define name="ELEVATOR_OF_ROLL" value="3007.81298828"/> <define name="ROLL_SLEW" value="1."/> <define name="ROLL_ATTITUDE_GAIN" value="11718.75"/> <define name="ROLL_RATE_GAIN" value="820.312011719"/> </section> <section name="AGGRESSIVE" prefix="AGR_"> <define name="BLEND_START" value="30"/> <define name="BLEND_END" value="15"/> <define name="CLIMB_THROTTLE" value="1."/> <define name="CLIMB_PITCH" value="0.40000000596"/> <define name="DESCENT_THROTTLE" value="0."/> <define name="DESCENT_PITCH" value="-0.10000000149"/> <define name="CLIMB_NAV_RATIO" value="0.800000011921"/> <define name="DESCENT_NAV_RATIO" value="0.834999978542"/> </section> <section name="FAILSAFE" prefix="FAILSAFE_"> <define name="DEFAULT_THROTTLE" value="0.35" unit="%"/> <define name="DEFAULT_ROLL" value="0.17" unit="rad"/> <define name="DEFAULT_PITCH" value="0.08" unit="rad"/> <define name="HOME_RADIUS" value="DEFAULT_CIRCLE_RADIUS" unit="m"/> <define name="KILL_MODE_DISTANCE" value="(MAX_DIST_FROM_HOME*1.3)"/> <define name="DELAY_WITHOUT_GPS" value="3" unit="s"/> </section> <section name="DIGITAL_CAMERA" prefix="DC_"> <!-- <define name="AUTOSHOOT_QUARTERSEC_PERIOD" value="8" unit="quarter_second"/> --> <!-- <define name="AUTOSHOOT_METER_GRID" value="50" unit="meter"/> --> </section> <section name="SIMULATOR" prefix="NPS_"> <!-- <define name="ACTUATOR_NAMES" value="{"front_motor", "back_motor", "right_motor", "left_motor"}"/> --> <define name="INITIAL_CONDITITONS" value=""reset00""/> <define name="SENSORS_PARAMS" value=""nps_sensors_params_default.h""/> </section> <modules> <load name="gps_ubx_ucenter.xml"/> <!-- <load name="ins_chimu_spi.xml" > <define name="CHIMU_BIG_ENDIAN" /> </load> --> <!-- <load name="dc.xml"/> --> <load name="digital_cam.xml"> <define name="DC_SHUTTER_LED" value="7"/> <define name="LED_7_BANK" value="0"/> <define name="LED_7_PIN" value="22"/> <define name="USE_LED_7" value="1"/> <!-- <define name="PUSH" value="LED_ON" /> <define name="RELEASE" value="LED_OFF" /> --> <define name="DC_RELEASE" value="LED_ON" /> <!-- zero volt on startup --> <define name="DC_PUSH" value="LED_OFF" /> <!-- 3.3 volt to trigger --> <define name="DC_SHUTTER_DELAY" value="4" unit="quarter_second"/> <define name="SENSOR_SYNC_SEND" value="1" /> </load> </modules> </airframe>
Hi Jorn, you are missing <subsystem name="ins"/> which is now mandatory in master. You can also take a look at the example conf/airframes/examples/quadrotor_lisa_m_2_pwm_spektrum.xml Cheers, Felix P.S. You should also rename your airframe to something that makes sense.... |
[Prev in Thread] | Current Thread | [Next in Thread] |