[Top][All Lists]

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

[Paparazzi-devel] Hello to this great community

From: Daniel Bedenko
Subject: [Paparazzi-devel] Hello to this great community
Date: Wed, 24 Sep 2008 04:12:57 -0700

Hello to everyone. I've recently finished my fun jet, and I am able to
flash (thank you poine) the tiny 2.1 that I got from ppzuav.
And I have a few questions.

Where are the parameters given for mode selection for Auto1/2/manual?

I don't have a gyro, can stable flight be done without it? and should
I comment out anything that has to do with a gyro?

Does the server have to be started first for anything else to work
right together?

Here is what happens thus far:

After flashing the board the servos go crazy, I am unable to get any
messages, the message box is empty. I know there is transmission going
on (because i have leds on both xbees, and i can get code using
Cutecom listeing to that port) nothing going on in the agent.

I am using a develpment board from Matream and two xbee-xsc modems.
I am using a royal evo 12 (set up for JR + shift) 5 channels.
2-axis ir
1-axis ir

I can't wait to get in the air. Thank you all in advance.


below are my airframe and radio files , (NG stands for nose gear),

<!DOCTYPE radio SYSTEM "radio.dtd">
<radio name="Royal Evo" data_min="960" data_max="2050" sync_min
="5000" sync_max ="15000">
 <channel ctl="1" function="THROTTLE"    max="1010" neutral="1500"
min="2050" average="0"/>
 <channel ctl="2" function="ROLL"        min="960" neutral="1500"
max="2050" average="0"/>
 <channel ctl="3" function="PITCH"       min="960" neutral="1500"
max="2050" average="0"/>
 <channel ctl="4" function="NG"          min="960" neutral="1500"
max="2050" average="0"/>
 <channel ctl="5" function="MODE"        min="960" neutral="1505"
max="2050" average="1"/>

<!DOCTYPE airframe SYSTEM "airframe.dtd">

<!-- Funjet Multiplex (
     Tiny 2.1 board (
     Tilted infrared sensor

<airframe name="Funjet 1 Tiny 2.1">

<!-- commands section -->
    <servo name="MOTOR"         no="0" min="1010" neutral="1010" max="2050"/>
    <servo name="AILEVON_LEFT"  no="2" min="960" neutral="1500" max="2050"/>
    <servo name="NG"            no="3" min="960" neutral="1500" max="2050"/>
    <servo name="AILEVON_RIGHT" no="6" min="2050" neutral="1500" max="960"/>


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

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


  <section name="MIXER">
    <define name="AILEVON_AILERON_RATE" value="0.75"/>
    <define name="AILEVON_ELEVATOR_RATE" value="0.75"/>

    <let var="aileron"  value="@ROLL  * AILEVON_AILERON_RATE"/>
    <let var="elevator" value="@PITCH * AILEVON_ELEVATOR_RATE"/>
    <set servo="MOTOR"           value="@THROTTLE"/>
    <set servo="NG"           value="@NG"/>
    <set servo="AILEVON_LEFT"  value="$elevator + $aileron"/>
    <set servo="AILEVON_RIGHT" value="$elevator - $aileron"/>

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

  <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 name="INFRARED" prefix="IR_">
    <define name="ADC_IR1_NEUTRAL" value="512"/>
    <define name="ADC_IR2_NEUTRAL" value="512"/>
    <define name="ADC_TOP_NEUTRAL" value="512"/>

    <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 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"
    <define name="ROLL_DIRECTION" value="-1."/>

  <section name="BAT">
    <define name="MILLIAMP_PER_PERCENT" value="0.86"/>

    <define name="CATASTROPHIC_BAT_LEVEL" value="9.3" unit="V"/>

  <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 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"
    <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 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 name="NAV">
    <define name="NAV_PITCH" value="0."/>
    <define name="NAV_GLIDE_PITCH_TRIM" value="0"/>

  <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 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 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 name="DATALINK" prefix="DATALINK_">
    <define name="DEVICE_TYPE" value="XBEE"/>
    <define name="DEVICE_ADDRESS" value="...."/>

  <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 name="SIMU">
    <define name="YAW_RESPONSE_FACTOR" value="0.5"/>

CONFIG = \"tiny_2_1.h\"

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


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.srcs += radio_control.c $(SRC_ARCH)/ppm_hw.c

ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c xbee.c


#ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c datalink.c pprz_transport.c

ap.srcs += inter_mcu.c

ap.srcs += $(SRC_ARCH)/adc_hw.c

ap.srcs += gps_ubx.c gps.c latlong.c

ap.srcs += infrared.c estimator.c

ap.srcs += nav.c fw_h_ctl.c fw_v_ctl.c

ap.srcs += gyro.c nav_line.c
ap.srcs += nav_survey_rectangle.c
# chemotaxis.c anemotaxis.c discsurvey.c

########## Barometer (SPI)
#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

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

# Config for SITL simulation
include $(PAPARAZZI_SRC)/conf/autopilot/sitl.makefile

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

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
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


reply via email to

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