paparazzi-devel
[Top][All Lists]
Advanced

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

[Paparazzi-devel] Update your airframe files to easier configuration, Su


From: Felix Ruess
Subject: [Paparazzi-devel] Update your airframe files to easier configuration, Subsystems introduced
Date: Tue, 24 Aug 2010 00:08:16 +0200

Hi all,

Because of its growth, paparazzi needs significant reorganization. To
make this possible without breaking airframe files, the 'subsystem'
idea introduced in booz is now generalized to all airframes.
   1. A nicer looking XML structure.
   2. users are not required to understand Makefiles anymore in order
to choose what to compile.

Replacing the makefile section of the airframe file with xml:
   1. Provide a simpler to understand and consistent syntax for end users.
   2. Enable Paparazzi centre to provide a list of all targets for an airframe.
   3. Simplify the design of tools that automatically generate airframe files.
   4. Simplify the process of documenting the airframe file and any
future additions to it.

The reorganization of directory structures is aimed at simplifying
development and maintenance. The aim here is to provide :
   1. A consistent structure for all targets, all architectures and
all subsystems.
   2. A structure that informs the naming of files.
   3. A route to enable the merging of fixed wing and rotor craft code bases.


So now the makefile section is not needed anymore in most circumstances.
For a standard airframe it you will have to add these sections to your
airframe file:

  <firmware name="fixedwing">
    <target name="sim"          board="pc"/>
    <target name="ap"                   board="tiny_2.11"/>
    <subsystem name="radio_control"    type="ppm"/>
    <subsystem name="telemetry"         type="transparent"/>
    <subsystem name="actuators"         type="4017"/>
    <subsystem name="attitude"          type="infrared"/>
    <subsystem name="gyro"                type="roll"/>
    <subsystem name="gps"               type="ublox_lea5h"/>
    <subsystem name="navigation"/>
  </firmware>

  <firmware name="setup">
    <target name="tunnel"                   board="tiny_2.11"/>
    <target name="setup_actuators"      board="tiny_2.11"/>
  </firmware>

Set the board attribute according to your hardware, the available boards are:
"twog_1", "tiny_2.11", "tiny_2.1", "tiny_1.1", "tiny_0.99",
"booz_1.0", "lisa_l_1.0", "pc"

Also remove the makefile section as well as the adc section.

The adc section to remove often looks something like this:
  <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>

This is now already defined by default and should be correct for most
users. If you use different ADCs you can use parameters in the
subsystems to set this, e.g.
replace
   <subsystem name="attitude" type="infrared"/>
with
   <subsystem name="attitude" type="infrared">
      <param name="ADC_IR1" value="ADC_2"/>
      <param name="ADC_IR2" value="ADC_1"/>
   </subsystem>
Or analogous for the gyro.


The UARTs used and the baud rates for the modem and GPS are now
defined by default according to your board as well.
The default baud rates are 57600baud for the modem and 38400baud for the GPS.
If you use different baud rates set the according parameters, e.g.
    <subsystem name="telemetry"         type="transparent">
      <param name="MODEM_BAUD"          value="B9600"/>
    </subsystem>

    <subsystem name="gps"       type="ublox_lea5h">
      <param name="GPS_BAUD"            value="B9600"/>
    </subsystem>


If you are using extra defines to enable features you can add them to
the respective target like this:
    <target name="ap"                   board="tiny_2.11">
      <define name="AGR_CLIMB" />
      <define name="LOITER_TRIM" />
      <define name="ALT_KALMAN" />
    </target>

There are a couple of *_example.xml airframes, have a look at them.

Please update your airframes accordingly so we can start to clean up
some code without breaking the airframes for everyone.
Comments, questions, etc. are welcome!

Cheers, Felix



reply via email to

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