[Top][All Lists]

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

Re: [Paparazzi-devel] Re: NPS Simulator: IMU Simulation

From: Felix Ruess
Subject: Re: [Paparazzi-devel] Re: NPS Simulator: IMU Simulation
Date: Sun, 23 Jan 2011 18:44:10 +0100

Hi Matthew,

the boot and and norc options are actually for the simple ocaml fixedwing sim.
So maybe we should add a default session "Rotorcraft simulation" that does not add these parameters?
You can also just edit the line in paparazzi center and remove the -boot -norc and execute the sim again, then it should work. (Then maybe save it as your own sim session).

From the line
  JSBSim failed to open the configuration file: (null)/conf/simulator/jsbsim/aircraft/CAARV.xml
it looks like you don't have the environment variables PAPARAZZI_HOME and PAPARAZZI_SRC defined (hence the (null)). You should probably add them to your shell startup file (.bashrc or .zshrc or whatever shell you use).

It works in paparazzi center because there it sets these variables (but does not export them), so it basically calls something like:
  $  PAPARAZZI_HOME=/home/aluminus/paparazzi PAPARAZZI_SRC=/home/aluminus/paparazzi ./sw/simulator/launchsitl -a CAARV

NPS uses JSBSim for the flight dynamic model (but you could use a different fdm as well) and adds all the stuff around it (e.g. simulation of sensor noise and feeding of the values).

Cheers, Felix
On Sun, Jan 23, 2011 at 6:28 PM, Matthew Plymale <address@hidden> wrote:
Felix, thank you for your help. I have created my own IMU architecture files which now reside in the arch/sim folder, I have implemented my own imu_feed functions, and the imu_feed compilation errors are gone. My new problem is when I try to run the simulator:

Run '/home/aluminus/paparazzi/sw/simulator/launchsitl -a CAARV -boot -norc'
/home/aluminus/paparazzi/var/CAARV/sim/simsitl: invalid option -- 'b'

Running from the terminal I get this:

address@hidden:~/paparazzi$ ./sw/simulator/launchsitl -a CAARV
Broadcasting on network, port 2010

     JSBSim Flight Dynamics Model v1.0 Oct 11 2010 15:24:33
            [JSBSim-ML v2.0]

JSBSim startup beginning ...

Could not open file: (null)/conf/simulator/jsbsim/aircraft/CAARV.xml
  JSBSim failed to open the configuration file: (null)/conf/simulator/jsbsim/aircraft/CAARV.xml

CAARV.xml exists and it has the flight model based on BOOZ2_A1, and when I try to run the simulator with BOOZ2_A1 (Poine's quadrotor) I get similar errors.
Why the confusion between JBSim and NPS?

Date: Sun, 23 Jan 2011 16:23:06 +0100
From: Felix Ruess <address@hidden>
Subject: Re: [Paparazzi-devel] NPS Simulator: IMU Simulation
To: address@hidden
Content-Type: text/plain; charset="utf-8"

Hi Matthew,

so if you have e.g. the B2 IMU in your airframe file:
 <subsystem name="imu"           type="b2_v1.1"/>
This just adds the conf/autopilot/subsystems/rotorcraft/imu_b2_v1.1.makefile
to your generated var/<aircraft>/ If you have a look at the imu
makefile you can see what files get added to the sim sources, among them:
 sim.srcs += $(SRC_ARCH)/subsystems/imu/imu_b2_arch.c
The makefile variable SRC_ARCH is always set to the architecture you are
compiling for (sim for sim (board="pc") and lpc21 for the booz board).

Do you have your own IMU implementatin that you need to write imu_feed
functions for?

Most of the files used in the sim target on rotorcraft (NPS) are set in
conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile wich normally gets
loaded with
 <target name="sim" board="pc">
     <subsystem name="fdm"   type="nps"/>
in your airframe file.

Also currently the stabilization, etc. used for the NPS is mostly set there.
We should probably use the same ones set for ap (add the sources for the sim
target to the respective subsystem makefile and take that out of the
If you want to improve this, please don't hesitate to ask for more info.
And patches/pull requests are welcome!

Cheers, Felix

On Thu, Jan 20, 2011 at 9:32 PM, Matthew Plymale <address@hidden>wrote:

> I am using NPS as the simulator in Paparazzi for our quadrotor.
> nps_autopilot_booz expects some imu_feed functions to simulate the IMU.
> Where must these functions be defined? I looked at some examples and found
> that the B2 IMU has 3 different arch files: one for stm32, one for lpc2148
> and one for sim. In the sim file, I can see imu_feed_etc. but how does
> Paparazzi select which IMU architecture code to use in the simulator? Where
> would I write my own imu_feed functions so that they are used in simulation?
> --
> Matthew Plymale
> Concordia University
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden

Paparazzi-devel mailing list

reply via email to

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