SCRIMMAGE Plugin / XML File Discovery¶
This tutorial assumes you have completed the section
Install SCRIMMAGE. Let’s start with the command we ran to run the
$ cd ~/scrimmage/scrimmage $ scrimmage ./missions/straight.xml
When executing this line, scrimmage first reads in the mission file
straight.xml. This file allows for quite a few customizations such as how
to visualize terrain and entities (aircraft in this case), how long we want the
simulation to run, where it takes place, and quite a few other items. For our
purposes though, the
entity block is the one of interest. In the scenario,
we have 2 teams each with fixed-wing aircraft. Thus, we have two entity blocks.
The team is set with the
team_id block and the entity type is set with the
autonomy block. 1 When
scrimmage sees the
Straight it does the following:
Looks for the file
SCRIMMAGE_PLUGIN_PATHand loads it.
Looks for the
paramsxml tag in
It loads the custom autonomy specified by the
librarytag (we will discuss how to create these libraries below)
It saves all other items in the
paramsblock and passes these variables to the
initmethod of the
libraryas a map of strings pointing to strings (we will discuss this below as well).
Later tutorials will discuss how to implement custom autonomy plugins.
A command line utility called
scrimmage-plugin can be used to find a plugin
and print its properties. For example, to find the
plugin, type the following:
$ scrimmage-plugin Straight
This utility is useful for debugging file path problems.
We actually fully specify an entity with the
autonomy. The first item concerns how a vehicle moves. In the case of a fixed-wing vehicle it can only move forward, roll, and pitch so we specify
SimpleAircraftas the motion model. Quadrotors have more degrees of freedom so they have the
SimpleQuadrotormotion model. As the names imply, there are higher fidelity motion models available.