paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] No throttle, any mode


From: Haiyang Chao
Subject: Re: [Paparazzi-devel] No throttle, any mode
Date: Thu, 16 Jul 2009 21:09:14 -0600

"your throttle symbol is red" means "kill_throttle" is on "1".

I don't know if it will work if u connect a servo to the throttle channel. Why not go to a throttle motor directly? It is not that easy to burn the motor controller and throttle motor if u make sure the power cable is correct. I would try to remove the Wait GPS, Geo Init and Holding Point block first just to see if the throttle still has that problem.

As long as your GPS Pacc is less than 10 meters, the GPS should be good.

Haiyang

On Thu, Jul 16, 2009 at 3:53 PM, Martin P <address@hidden> wrote:
Hi all,

I have been searching the list archive about mayday, throttle, etc and found postings describing problems getting the trhottle in AUTO2. I am not yet as far as this.

I did all the entries in the radio and airframe files and I am able to move ailerons, elevator and rudder in manual mode.
For test, I attached a little servo to the throttle channel and hoped to be able to move it with the throttle stick on my RX. It does not work.

When I look at the "commands" in the message tool, I see a change when I move the stick.
When I look at the "actuators" in the message tool, I do not see a change when I move the stick.
In the GCS, the throttle is 0% and the symbol is red,

I also get a "mayday kill mode" in the GCS even though the voltage is above critical and low voltages. Sometimes I get to the "holding point" but in the moment I am not even able to go beyond "geo init" block (using a flight plan that is derived from funjet1) although the GPS has a fix and the aircraft symbol is shown in the map.

Greetings, Martin


PS: I attach the GCS output, radio, airframe and flightplan
--------

23:05:26 MJ5, UNK
23:05:26 MJ5, mayday, kill mode
23:05:28 MJ5, AUTO2
23:05:29 MJ5, Wait GPS
23:21:06 MJ5, NOGPS
23:25:14 MJ5, Geo init
23:25:14 MJ5, AUTO2
23:25:15 MJ5, MANUAL
23:25:15 GPS acc: 56 m
23:25:17 GPS acc: 27 m
23:25:19 GPS acc: 21 m
23:25:21 MJ5, HOME
23:25:21 GPS acc: 19 m
23:25:23 GPS acc: 18 m
23:25:25 GPS acc: 17 m
23:25:27 GPS acc: 16 m
23:25:37 GPS acc: 15 m
23:31:21 GPS acc: 16 m
23:31:27 GPS acc: 15 m
23:42:39 GPS acc: 16 m
23:42:41 GPS acc: 18 m
23:42:45 GPS acc: 17 m
23:42:47 GPS acc: 15 m

<!DOCTYPE radio SYSTEM "radio.dtd">
<radio name="futaba-fx18" data_min="900" data_max="2100" sync_min ="5000" sync_max ="15000">
 <channel ctl="A" function="ROLL"     min="1000" neutral="1498" max="2000" average="0"/>
 <channel ctl="B" function="PITCH"    min="1000" neutral="1498" max="2000" average="0"/>
 <channel ctl="C" function="THROTTLE" min="1120" neutral="1120" max="2000" average="0"/>
 <channel ctl="D" function="YAW"      min="1000" neutral="1498" max="2000" average="0"/>
 <channel ctl="E" function="MODE"     min="2000" neutral="1500" max="1000" average="1"/> <!-- Top right switch     -->
 <channel ctl="F" function="CALIB"    min="2000" neutral="1500" max="1000" average="1"/> <!-- left bottom slider -->
 <!--channel ctl="G" function="GAIN1"    min="2000" neutral="1498" max="1000" average="1"/--> <!-- center slider        -->
</radio>


--------------------------airframe---------------------
<!DOCTYPE airframe SYSTEM "airframe.dtd">

<!-- Funjet Multiplex (http://www.multiplex-rc.de/)
    Tiny 2.1 board (http://paparazzi.enac.fr/wiki/index.php/Tiny_v2)
    Tilted infrared sensor (http://paparazzi.enac.fr/wiki/index.php/Image:Tiny_v2_1_Funjet.jpg)
    Radiotronix modem
-->

<airframe name="Funjet 1 Tiny 2.1">

<!-- commands section -->
 <servos>
   <servo name="AILERON" no="0" min="1980" neutral="1515" max="1170"/>
   <servo name="ELEVATOR"  no="2" min="1130" neutral="1500" max="1880"/>
   <servo name="MOTOR"         no="3" min="2000" neutral="1000" max="1000"/>
   <servo name="RUDDER" no="4" min="1980" neutral="1515" max="1170"/>
 </servos>

 <commands>
   <axis name="ROLL"     failsafe_value="0"/>
   <axis name="PITCH"    failsafe_value="0"/>
   <axis name="THROTTLE" failsafe_value="0"/>
   <axis name="YAW"    failsafe_value="0"/>
 </commands>

 <rc_commands>
   <set command="ROLL"     value="@ROLL"/>
   <set command="PITCH"    value="@PITCH"/>
   <set command="THROTTLE" value="@THROTTLE"/>
   <set command="YAW"    value="@YAW"/>
 </rc_commands>

 <command_laws>
   <set servo="AILERON"   value="@ROLL"/>
   <set servo="ELEVATOR"  value="@PITCH"/>
   <set servo="MOTOR"     value="@THROTTLE"/>
   <set servo="RUDDER"    value="@YAW"/>
 </command_laws>

 <section name="AUTO1" prefix="AUTO1_">
   <define name="MAX_ROLL" value="0.85"/>
   <define name="MAX_PITCH" value="0.6"/>
 </section>

 <section name="adc" prefix="ADC_CHANNEL_">
   <define name="IR1" value="ADC_1"/>
   <define name="IR2" value="ADC_2"/>
   <define name="IR_TOP" value="ADC_0"/>
   <define name="IR_NB_SAMPLES" value="16"/>

   <define name="GYRO_ROLL" value="ADC_3"/>
   <define name="GYRO_NB_SAMPLES" value="16"/>

 </section>

 <section name="INFRARED" prefix="IR_">
   <define name="ADC_IR1_NEUTRAL" value="512"/>
   <define name="ADC_IR2_NEUTRAL" value="513"/>
   <define name="ADC_TOP_NEUTRAL" value="509"/>

   <define name="LATERAL_CORRECTION" value="1."/>
   <define name="LONGITUDINAL_CORRECTION" value="1."/>
   <define name="VERTICAL_CORRECTION" value="1.5"/>

   <define name="HORIZ_SENSOR_TILTED" value="1"/>
   <define name="IR2_SIGN" value="1"/>
   <define name="TOP_SIGN" value="-1"/>

   <define name="ROLL_NEUTRAL_DEFAULT" value="-3.6" unit="deg"/>
   <define name="PITCH_NEUTRAL_DEFAULT" value="6" unit="deg"/>

   <define name="CORRECTION_UP" value="1."/>
   <define name="CORRECTION_DOWN" value="1."/>
   <define name="CORRECTION_LEFT" value="1."/>
   <define name="CORRECTION_RIGHT" value="1."/>
 </section>

 <section name="GYRO" prefix="GYRO_">
   <define name="ADC_ROLL_NEUTRAL" value="520"/>
   <define name="ADC_TEMP_NEUTRAL" value="476"/>
   <define name="ADC_TEMP_SLOPE" value="0"/>
   <define name="DYNAMIC_RANGE" value="300" unit="deg/s"/>
   <define name="ADXRS300_RESISTOR_BRIDGE" value="(3.3/(3.3+1.8))"/>
   <define name="ADXRS300_SENSITIVITY" value="5" unit="mV/(deg/s)"/>
   <define name="ROLL_SCALE" value="3.3*1000./1024./(GYRO_ADXRS300_SENSITIVITY*GYRO_ADXRS300_RESISTOR_BRIDGE)" unit="deg/s/adc_unit"/>
   <define name="ROLL_DIRECTION" value="-1."/>
 </section>

 <section name="BAT">
 <define name="MILLIAMP_AT_FULL_THROTTLE" value="28000" unit="mA" /><!--MP-->
   <define name="MILLIAMP_PER_PERCENT" value="0.86"/>

   <define name="CATASTROPHIC_BAT_LEVEL" value="10.5" unit="V"/>
 <define name="CRITIC_BAT_LEVEL" value="10.8" unit="V"/><!--MP-->
 <define name="LOW_BAT_LEVEL" value="11.0" unit="V"/><!--MP-->
 <define name="MAX_BAT_LEVEL" value="12.5" unit="V"/><!--MP-->
 </section>

 <section name="MISC">
   <define name="NOMINAL_AIRSPEED" value="17." unit="m/s"/>
   <define name="CARROT" value="5." unit="s"/>
   <define name="KILL_MODE_DISTANCE" value="(1.5*MAX_DIST_FROM_HOME)"/>
   <define name="CONTROL_RATE" value="60" unit="Hz"/>
<!--    <define name="XBEE_INIT" value="\"ATPL2\rATRN1\rATTT80\r\""/> -->
<!--    <define name="NO_XBEE_API_INIT" value="TRUE"/> -->
   <define name="ALT_KALMAN_ENABLED" value="TRUE"/>

   <define name="TRIGGER_DELAY" value="1."/>
   <define name="DEFAULT_CIRCLE_RADIUS" value="80."/>
   <define name="MIN_CIRCLE_RADIUS" value="50."/>
 </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.04"/>
   <!-- outer loop saturation -->
   <define name="ALTITUDE_MAX_CLIMB" value="2."/>

   <!-- auto throttle inner loop -->
   <define name="AUTO_THROTTLE_NOMINAL_CRUISE_THROTTLE" value="0.35"/>
   <define name="AUTO_THROTTLE_MIN_CRUISE_THROTTLE" value="0.3"/>
   <define name="AUTO_THROTTLE_MAX_CRUISE_THROTTLE" value="0.80"/>
   <define name="AUTO_THROTTLE_LOITER_TRIM" value="1500"/>
   <define name="AUTO_THROTTLE_DASH_TRIM" value="-1000"/>
   <define name="AUTO_THROTTLE_CLIMB_THROTTLE_INCREMENT" value="0.1" unit="%/(m/s)"/>
   <define name="AUTO_THROTTLE_PGAIN" value="-0.02"/>
   <define name="AUTO_THROTTLE_IGAIN" value="0.1"/>
   <define name="AUTO_THROTTLE_PITCH_OF_VZ_PGAIN" value="0.1"/>

   <!-- auto pitch inner loop -->
   <define name="AUTO_PITCH_PGAIN" value="-0.05"/>
   <define name="AUTO_PITCH_IGAIN" value="0.075"/>
   <define name="AUTO_PITCH_MAX_PITCH" value="0.35"/>
   <define name="AUTO_PITCH_MIN_PITCH" value="-0.35"/>

  <define name="THROTTLE_SLEW" value="0.5"/>

 </section>

 <section name="HORIZONTAL CONTROL" prefix="H_CTL_">
   <define name="COURSE_PGAIN" value="-1.2"/>

   <define name="ROLL_MAX_SETPOINT" value="0.7" 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="-10000."/>
   <define name="PITCH_DGAIN" value="1.5"/>

   <define name="ELEVATOR_OF_ROLL" value="2500"/>

   <define name="ROLL_ATTITUDE_GAIN" value="-7500"/>
   <define name="ROLL_RATE_GAIN" value="-1500"/>
 </section>

 <section name="NAV">
   <define name="NAV_PITCH" value="0."/>
   <define name="NAV_GLIDE_PITCH_TRIM" value="0"/>
 </section>

 <section name="AGGRESSIVE" prefix="AGR_">
   <define name="BLEND_START" value="20"/><!-- Altitude Error to Initiate Aggressive Climb CANNOT BE ZERO!!-->
   <define name="BLEND_END" value="10"/><!-- Altitude Error to Blend Aggressive to Regular Climb Modes  CANNOT BE ZERO!!-->
   <define name="CLIMB_THROTTLE" value="0.7"/><!-- Gaz for Aggressive Climb -->
   <define name="CLIMB_PITCH" value="0.25"/><!-- Pitch for Aggressive Climb -->
   <define name="DESCENT_THROTTLE" value="0.1"/><!-- Gaz for Aggressive Decent -->
   <define name="DESCENT_PITCH" value="-0.15"/><!-- Pitch for Aggressive Decent -->
   <define name="CLIMB_NAV_RATIO" value="0.8"/><!-- Percent Navigation for Altitude Error Equal to Start Altitude -->
   <define name="DESCENT_NAV_RATIO" value="1.0"/>
   </section>


 <section name="GYRO_GAINS">
   <define name="GYRO_MAX_RATE" value="200."/>
   <define name="ROLLRATESUM_NB_SAMPLES" value="64"/>
   <define name="ALT_ROLL__PGAIN" value="1.0"/>
   <define name="ROLL_RATE_PGAIN" value="1000.0"/>
   <define name="ROLL_RATE_IGAIN" value="0.0"/>
   <define name="ROLL_RATE_DGAIN" value="0.0"/>
 </section>

 <section name="FAILSAFE" prefix="FAILSAFE_">
       <define name="DELAY_WITHOUT_GPS" value="1" unit="s"/>
       <define name="DEFAULT_THROTTLE" value="0.3" unit="%"/>
       <define name="DEFAULT_ROLL" value="0.3" unit="rad"/>
       <define name="DEFAULT_PITCH" value="0.5" unit="rad"/>
       <define name="HOME_RADIUS" value="100" unit="m"/>
</section>

<!--
 <section name="DATALINK" prefix="DATALINK_">
   <define name="DEVICE_TYPE" value="XBEE"/>
   <define name="DEVICE_ADDRESS" value="...."/>
 </section>
-->

 <section name="Digital camera telecommand">
   <!-- IOs are seen as LEDs -->

   <define name="LED_6_BANK" value="0"/>
   <define name="LED_6_PIN" value="2"/> <!-- I2C SCL -->

   <!-- ADC 5 -->
   <define name="LED_7_BANK" value="0"/>
   <define name="LED_7_PIN" value="3"/> <!-- I2C SDA -->

   <define name="DC_SHUTTER_LED" value="6"/> <!-- Grey wire -->
   <define name="DC_ZOOM_LED" value="7"/>
 </section>

 <makefile>
CONFIG = \"tiny_2_1_1.h\"

include $(PAPARAZZI_SRC)/conf/autopilot/tiny.makefile

FLASH_MODE=IAP

ap.CFLAGS +=  -DFBW -DAP -DCONFIG=$(CONFIG) -DLED -DTIME_LED=1
ap.srcs = sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c main_fbw.c main_ap.c main.c

ap.srcs += commands.c

ap.CFLAGS += -DACTUATORS=\"servos_4017_hw.h\" -DSERVOS_4017
ap.srcs += $(SRC_ARCH)/servos_4017_hw.c actuators.c

ap.CFLAGS += -DRADIO_CONTROL -DRADIO_CONTROL_TYPE=RC_FUTABA
ap.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c

#XBEE ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=XBeeTransport -DXBEE_UART=Uart1 -DDATALINK=XBEE -DUART1_BAUD=B9600
#XBEE ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c

#TRANSPARENT
ap.CFLAGS += -DDOWNLINK -DUSE_UART1 -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_FBW_DEVICE=Uart1 -DDOWNLINK_AP_DEVICE=Uart1 -DPPRZ_UART=Uart1 -DDATALINK=PPRZ -DUART1_BAUD=B9600
ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c


ap.CFLAGS += -DINTER_MCU
ap.srcs += inter_mcu.c

ap.CFLAGS += -DADC -DUSE_ADC_0 -DUSE_ADC_1 -DUSE_ADC_2 -DUSE_ADC_3
ap.srcs += $(SRC_ARCH)/adc_hw.c

ap.CFLAGS += -DGPS -DUBX -DUSE_UART0 -DGPS_LINK=Uart0 -DUART0_BAUD=B38400 -DGPS_USE_LATLONG
# -DGPS_LED=2
ap.srcs += gps_ubx.c gps.c latlong.c

ap.CFLAGS += -DINFRARED -DALT_KALMAN
ap.srcs += infrared.c estimator.c

ap.CFLAGS += -DNAV -DAGR_CLIMB -DLOITER_TRIM
ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c


ap.CFLAGS += -DGYRO -DADXRS150
ap.srcs += gyro.c nav_line.c
ap.srcs += nav_survey_rectangle.c
# chemotaxis.c anemotaxis.c discsurvey.c

########## Barometer (SPI)
#ap.CFLAGS += -DUSE_SPI -DSPI_MASTER -DUSE_SPI_SLAVE0 -DUSE_BARO_MS5534A
#ap.srcs += spi.c $(SRC_ARCH)/spi_hw.c $(SRC_ARCH)/baro_MS5534A.c

########## Chemo sensor (I2C)
#ap.srcs += i2c.c arm7/i2c_hw.c enose.c chemo_detect.c
#ap.CFLAGS += -DUSE_I2C -DENOSE

# Digital camera
# Shutter: I2C SCL
# Zoom: I2C SDA
ap.CFLAGS += -DDIGITAL_CAM
ap.srcs += dc.c


# Config for SITL simulation
include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile
sim.CFLAGS += -DCONFIG=\"tiny.h\" -DAGR_CLIMB -DLOITER_TRIM -DALT_KALMAN

sim.srcs += nav_line.c nav_survey_rectangle.c
# -DENOSE
# chemotaxis.c anemotaxis.c discsurvey.c $(SRC_ARCH)/sim_enose.c chemo_detect.c

sim.CFLAGS += -DDIGITAL_CAM -DPOWER_SWITCH_LED=4
sim.srcs += dc.c




# a test program to setup actuators
setup_actuators.ARCHDIR = $(ARCHI)
setup_actuators.ARCH = arm7tdmi
setup_actuators.TARGET = setup_actuators
setup_actuators.TARGETDIR = setup_actuators

setup_actuators.CFLAGS += -DFBW -DCONFIG=\"tiny.h\" -DLED -DTIME_LED=1 -DACTUATORS=\"servos_4015_hw.h\" -DSERVOS_4015 -DUSE_UART1 -DUART1_BAUD=B9600 -DDATALINK=PPRZ -DPPRZ_UART=Uart1
setup_actuators.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c pprz_transport.c setup_actuators.c $(SRC_ARCH)/uart_hw.c $(SRC_ARCH)/servos_4015_hw.c main.c

 </makefile>
</airframe>

-----------------------------------
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">



<flight_plan alt="75" ground_alt="0" lat0="48.206111111" lon0="16.377222222" max_dist_from_home="1500" name="Frauenkirchen" security_height="25">
 <header>
#include "nav_line.h"
#include "datalink.h"
</header>
 <waypoints>
   <waypoint name="HOME" x="0" y="0"/>
   <waypoint name="STDBY" x="49.5" y="100.1"/>
   <waypoint name="1" x="-108.0" y="129.4"/>
   <waypoint name="2" x="64.6" y="-23.6"/>
   <waypoint name="MOB" x="137.0" y="-11.6"/>
   <waypoint name="S1" x="-119.2" y="69.6"/>
   <waypoint name="S2" x="274.4" y="209.5"/>
   <waypoint alt="30.0" name="AF" x="25.5" y="-17.7"/>
   <waypoint alt="0.0" name="TD" x="-100.9" y="82.6"/>
   <waypoint name="_BASELEG" x="168.8" y="-13.8"/>
   <waypoint name="CLIMB" x="-114.5" y="162.3"/>
 </waypoints>
 <exceptions/>
 <blocks>
   <block name="Wait GPS">
     <set value="1" var="kill_throttle"/>
     <while cond="!GpsFixValid()"/>
   </block>
   <block name="Geo init">
     <while cond="LessThan(NavBlockTime(), 10)"/>
     <call fun="NavSetGroundReferenceHere()"/>
   </block>
   <block name="Holding point">
     <set value="1" var="kill_throttle"/>
     <attitude roll="0" throttle="0" vmode="throttle"/>
   </block>
   <block name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
     <exception cond="estimator_z > ground_alt+25" deroute="Flugprogramm1"/>
     <set value="0" var="kill_throttle"/>
     <set value="0" var="estimator_flight_time"/>
     <go from="HOME" pitch="15" throttle="1.0" vmode="throttle" wp="CLIMB"/>
   </block>
   <block name="Standby" strip_button="Standby" strip_icon="home.png">
     <circle radius="nav_radius" wp="STDBY"/>
   </block>
   <block name="Flugprogramm1" strip_button="Figure 8 (wp 1-2)" strip_icon="eight.png">
     <go wp="1" approaching_time="0"/>
     <go wp="2" approaching_time="0"/>
     <go wp="1" approaching_time="0"/>
     <go wp="2" approaching_time="0"/>
     <deroute block="Land Right AF-TD"/>
   </block>
   <block name="Oval 1-2" strip_button="Oval (wp 1-2)" strip_icon="oval.png">
     <oval p1="1" p2="2" radius="nav_radius"/>
   </block>
   <block name="MOB" strip_button="Turn around here" strip_icon="mob.png">
     <call fun="NavSetWaypointHere(WP_MOB)"/>
     <set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
     <circle radius="nav_radius" wp="MOB"/>
   </block>
   <block name="Line 1-2" strip_button="Line (wp 1-2)" strip_icon="line.png">
     <exception cond="datalink_time > 22" deroute="Standby"/>
     <call fun="nav_line_init()"/>
     <call fun="nav_line(WP_1, WP_2, nav_radius)"/>
   </block>
   <block name="Survey S1-S2" strip_button="Survey (wp S1-S2)" strip_icon="survey.png">
     <survey_rectangle grid="150" wp1="S1" wp2="S2"/>
   </block>
   <block name="Land Right AF-TD" strip_button="Land right (wp AF-TD)" strip_icon="land-right.png">
     <set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
     <deroute block="land"/>
   </block>
   <block name="Land Left AF-TD" strip_button="Land left (wp AF-TD)" strip_icon="land-left.png">
     <set value="-DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
     <deroute block="land"/>
   </block>
   <block name="land">
     <call fun="nav_compute_baseleg(WP_AF, WP_TD, WP__BASELEG, nav_radius)"/>
     <circle radius="nav_radius" until="NavCircleCount() > 0.5" wp="_BASELEG"/>
     <circle radius="nav_radius" until="And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-10), 10 > fabs(estimator_z - WaypointAlt(WP__BASELEG)))" wp="_BASELEG"/>
   </block>
   <block name="final">
     <exception cond="ground_alt + 10 > estimator_z" deroute="flare"/>
     <go from="AF" hmode="route" vmode="glide" wp="TD"/>
   </block>
   <block name="flare">
     <go approaching_time="0" from="AF" hmode="route" throttle="0.0" vmode="throttle" wp="TD"/>
     <attitude roll="0.0" throttle="0.0" until="FALSE" vmode="throttle"/>
   </block>
 </blocks>
</flight_plan>


_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]