Trouble launching SITL

Hello everyone,

I’m trying to do a full-stock SITL of the APM::Plane code. I followed these instructions:
I’m on Ubuntu 12.04.


  1. I had already installed MAVProxy in my system and possibly some of the other packages required. Sadly, I do not have a clean installation to work on.
  2. I cloned the ardupilot code and jsbsim repos onto ~/Ardupilot folder, which I created.

I added the following lines to my .bashrc file:

#ArduPilot SITL stuff export PATH=$PATH:$HOME/Ardupilot/ardupilot/Tools/autotest export PATH=$PATH:$HOME/Ardupilot/jsbsim/src

This is my PATH right now

georgezp@fwuav-linux:~$ echo $PATH /home/georgezp/ROS/catkin_ws/devel/bin:/opt/ros/hydro/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/georgezp/Ardupilot/ardupilot/Tools/autotest:/home/georgezp/Ardupilot/jsbsim/src

In the /home/georgezp/Ardupilot/ardupilot/ArduPlane folder, I run:


Note: for some reason sudo is needed, otherwise I get:


  • --master tcp: --sitl --out --out '–cmd=param forceload /home/georgezp/Ardupilot/ardupilot/Tools/autotest/ArduPlane.parm; ; param fetch’
    Failed to connect to tcp: : [Errno 111] Connection refused
    I Ctrl+C MAVProxy and run:

Everything opens but on the XTerm window titled “Simulator” I get:

Wrote aircraft/Rascal/reset.xml Wrote jsbsim/fgout.xml Wrote jsbsim/rascal_test.xml Traceback (most recent call last): File "/home/georgezp/Ardupilot/ardupilot/Tools/autotest/jsbsim/", line 199, in <module> jsb = pexpect.spawn(cmd, logfile=sys.stdout, timeout=10) File "/usr/lib/python2.7/dist-packages/", line 429, in __init__ self._spawn (command, args) File "/usr/lib/python2.7/dist-packages/", line 516, in _spawn raise ExceptionPexpect ('The command was not found or was not executable: %s.' % self.command) pexpect.ExceptionPexpect: The command was not found or was not executable: JSBSim.

JSBSim is in my path and can be run separately:

[code]georgezp@fwuav-linux:~/Ardupilot/ardupilot/ArduPlane$ JSBSim

JSBSim version 1.0 Nov 28 2014 16:13:07

Usage: jsbsim

–help returns this message
–version returns the version number
–outputlogfile= sets (overrides) the name of the first data output file
–logdirectivefile= specifies the name of a data logging directives file
(can appear multiple times)
–root= specifies the JSBSim root directory (where aircraft/, engine/, etc. reside)
–aircraft= specifies the name of the aircraft to be modeled
–script= specifies a script to run
–realtime specifies to run in actual real world time
–nice specifies to run at lower CPU usage
–suspend specifies to suspend the simulation after initialization
–initfile= specifies an initilization file
–catalog specifies that all properties for this aircraft model should be printed
(catalog=aircraftname is an optional format)
–property=<name=value> e.g. --property=simulation/integrator/rate/rotational=1
–simulation-rate=<rate (double)> specifies the sim dT time or frequency
–end-time=<time (double)> specifies the sim end time

NOTE: There can be no spaces around the = sign when
an option is followed by a filename[/code]

Needless to say, nothing moves when I load the waypoints and hit AUTO.

Can anyone help me solve this error? Thanks in advance.
Moderators, feel free to move this if it is in the wrong subforum.

Try adding these:
export PATH=$PATH:/usr/local/lib/python2.7/dist-packages/MavProxy
export PATH=$PATH:/usr/local/lib/python2.7/dist-packages/pymavlink/examples
export PATH=/usr/lib/ccache:$PATH

(Not 100% sure that you need ccache, but for some reason I use it.)

No luck: Same error message, regarding JSBSim.
Some notes: There is no folder “examples” in my /usr/local/lib/python2.7/dist-packages/pymavlink folder, neither a “ccache” folder in /usr/lib.

I think I’ll try installing a virtual machine for various Ubuntu versions, to have a clean installation to check against.

You can also try or view the SITL_installer script on RCGroups, and see if that give you any hints on what’s wrong
Just be aware that it’s not focused on setting up an environment for developers. It’s something we regular users made to facilitate SITL setup.


I had stumbled upon this rcg thread before posting here, but I decided against installing it, because I could not control which components it would add. As I said I already had some of them in my system.
However, it won’t hurt checking it out in the VBox.

I managed to run the SITL after all. Here’s what happened.

At first, I tried to use lxc to build a container to get my hands quickly on a clean systems (so clean it didn’t even have ‘make’ in it!). I failed to test SITL on it, though, since, after several hours of efforts to set up the container it wouldn’t run XTERM because I had no DISPLAY variable assigned on the system, so I stopped there.

Then, I used a friend’s Ubuntu 14.04 system and ran the exact same commands from the home folder, as given on the SITL guide. Everything worked.

Then, I returned to my 12.04 system, which previously behaved as described as detailed in post#1, and ran the same SITL installation procedure as in the guide, but from the home folder. Everything worked, so I assume this is what was needed.

I think installing ardupilot and jsbsim only in the home folder is important enough to be specified in the wiki.