Repository navigation
[2.2] XML Configuration File
ARGoS accepts a user defined XML file as input in order to set up variables for an experiment. The outline below summarizes all of the major features of the XML file with links to information explaining specific sections in detail.
- <framework>
- <controllers>
-
<iAnt_controller>
- <actuators>
- <sensors>
- <params>
-
<iAnt_controller>
- <loop_functions>
-
<arena>
- <floor>
- <distribute>
- <physics_engines>
- <media>
-
<visualization>
- <qt-opengl>
- <camera>
- <user_functions>
- <qt-opengl>
<framework>
<experiment length="1800" ticks_per_second="16" random_seed="1337"/>
</framework>
| Variable | Data Type | Description |
|---|---|---|
| length | unsigned long int | length of the experiment in seconds; NOTE: zero length sets no time limit, the simulation will run until stopped manually (i.e., do not set to zero without GUI) |
| ticks_per_second | double | frames per second in the graphical user interface |
| random_seed | unsigned long int | seed for random number generator |
[back to top][home]
<controllers>
<iAnt_controller id="iAnt_c" library="build/controllers/libiAnt_controller.so">
...
</iAnt_controller>
</controllers>
| Variable | Description |
|---|---|
| id | Arbitrary string ID used by ARGoS to identify this controller object. |
| library | Relative to where ARGoS is run via the command line, this is the location in the file system of the shared object file (or dynamic library on Mac) for compiled iAnt_controller class code. |
[back to top][home]
<controllers>
<iAnt_controller ... >
<actuators>
<differential_steering implementation="default"/>
</actuators>
...
...
</iAnt_controller>
</controllers>
| Variable | Value | Description |
|---|---|---|
| implementation | "default" | Do not change. Sets the default implementation for the actuator that changes the robot's speed. |
[back to top][home]
<controllers>
<iAnt_controller ... >
...
<sensors>
<footbot_proximity implementation="default" show_rays="false"/>
...
</sensors>
...
</iAnt_controller>
</controllers>
| Variable | Value | Description |
|---|---|---|
| implementation | "default" | Do not change. Sets the default implementation for the sensor that detects collisions. |
| show_rays | "false" | Graphically displays collision detection in the GUI: set to "true" to turn this on. |
[back to top][home]
<controllers>
<iAnt_controller ... >
...
<sensors>
...
<positioning implementation="default"/>
</sensors>
...
</iAnt_controller>
</controllers>
| Variable | Value | Description |
|---|---|---|
| implementation | "default" | Do not change. Sets the default implementation for the positioning sensor, i.e. the robot's compass. |
[back to top][home]
<controllers>
<iAnt_controller ... >
...
<params>
<CPFA pheromoneRate="10"
pheromoneDecayRate="0.01"
travelGiveupProbability="0.999999"
siteFidelityRate="10"
informedSearchDecay="0.001"
searchRadius="0.23"
searchStepSize="0.08"
distanceTolerance="0.1"
searchGiveupProbability="0.000001"
angleTolerance="22.5"
maxRobotSpeed="16.0"
uninformedSearchCorrelation="13.25"/>
</params>
</iAnt_controller>
</controllers>
| Variable | Value Range | Description |
|---|---|---|
| pheromoneRate | always_[0.0,20.0]_never | probability of laying a pheromone |
| pheromoneDecayRate | slow_[0.0,1.0]_fast | exponential decay rate |
| travelGiveupProbability | low_[0.0,1.0]_high | probability of giving up on traveling; that is, the probability of switching to searching and giving up on travel |
| siteFidelityRate | always_[0.0,20.0]_never | probability of using site fidelity |
| informedSearchDecay | slow_[0.0,1.0]_fast | exponential decay rate |
| searchRadius | double | radius in meters where the iAnt checks for nearby food after picking up food, the default is 0.23, changing this value WILL CHANGE the behavior caused by pheromoneRate and siteFidelityRate (i.e., leave it as its default value at first) |
| searchStepSize | double | distance (in meters) traveled per step during search before turning |
| distanceTolerance | double | distance (in meters) before the robot detects collisions |
| searchGiveupProbability | low_[0.0,1.0]_high | probability of giving up on searching; that is, the probability of returning to the nest and giving up on search |
| angleTolerance | double (degrees) | angle used for collision detection calculations; input in XML is in degrees which is translated into radians for use within the sim |
| maxRobotSpeed | double | robot speed used in simulation; the robot will either be stopped or turning/moving at this speed only |
| uninformedSearchCorrelation | 0.0 to 720.0 (degrees) | (AKA uniformed search variation) This is the maximum angle range a robot can turn between steps during search. Input in XML is in degrees which is translated into radians for use within the simulation. It is recommended to use initial values of 15 degrees. |
[back to top][home]
<loop_functions library="build/loop_functions/libiAnt_loop_functions.so"
label="iAnt_loop_functions">
...
</loop_functions>
| Variable | Description |
|---|---|
| library | Relative to where ARGoS is run via the command line, this is the location in the file system of the shared object file (or dynamic library on Mac) with compiled iAnt_loop_functions class code. |
| label | Arbitrary string label that the ARGoS simulator uses as an ID for this loop functions object. |
[back to top][home]
<loop_functions ... >
<simulation_settings variableSeed="1"
outputData="1"
nestPosition="0.0, 0.0"
nestRadius="0.5"
foodRadius="0.05"
foodItemCount="100"
foodDistribution="2"/>
...
</loop_functions>
| Variable | Value | Description |
|---|---|---|
| variableSeed | 0[off] or 1[on] only | When running multiple experiments in a row, this variable will increment the random seed by 1 each time the GUI is reset. |
| outputData | 0[off] or 1[on] only | When running ARGoS, set this flag if you want the results appended to an output file. This file is named iAntTagData.txt. If the file doesn't exist, it is created in the directory where you run ARGoS; otherwise, the current file is appended to with new data each time an experiment is run. |
| nestPosition | x[double], y[double] | Sets the (X,Y) coordinate for the center of the nest in the arena. |
| nestRadius | double | Sets the radius of the nest from its (X,Y) position. |
| foodItemCount | unsigned int | Sets the number of food items to be placed on the map. |
| foodDistribution | 0, 1, 2 only | Sets the food distribution to be used. 0 = random, 1 = clustered, 2 = power law. |
[back to top][home]
<loop_functions ... >
<simulation_settings ...
foodItemCount="100"
foodDistribution="0"/>
<random_distribution_0/> <!-- no settings for this distribution -->
...
</loop_functions>
No settings currently exist for this distribution. However, in the future the foodItemCount variable from <simulation_settings> should be moved here as a parameter. Food tags are randomly distributed across the entire arena space.
[back to top][home]
<loop_functions ... >
<simulation_settings ...
...
foodDistribution="1"/>
<cluster_distribution_1 numberOfClusters="10"
clusterWidthX="3"
clusterLengthY="3"/>
...
</loop_functions>
| Variable | Value | Description |
|---|---|---|
| numberOfClusters | unsigned int | The total number of uniform clusters to place in the arena. |
| clusterWidthX | unsigned int | The width of the cluster. |
| clusterLengthY | unsigned int | The length of the cluster. |
A set number of clusters of exactly the same size are randomly distributed across the arena space.
[back to top][home]
<loop_functions library="build/loop_functions/libiAnt_loop_functions.so"
label="iAnt_loop_functions">
<simulation_settings ...
...
foodDistribution="2"/>
...
<powerLaw_distribution_2 powerRank="4"/>
</loop_functions>
The power rank distribution places tags in variable pile sizes according to the following formula.
| Rank | Tags Placed | Piles Placed |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 1 |
| 2 | 8 | [1]2x2, [4]1x1 |
| 3 | 48 | [1]4x4, [4]2x2, [16]1x1 |
| 4 (default) | 256 | [1]8x8, [4]4x4, [16]2x2, [64]1x1 |
| 5 | 1280 | [1]16x16, [4]8x8, [16]4x4, [64]2x2, [256]1x1 |
| n | sum(4^i*2^[2(n-i+1)]); from i=0,...,(n - 1) | [4^0]2^(n-1)x2^(n-1), [4^1]2^(n-2)x2^(n-2), ..., [4^(n-1)]2^0x2^0 |
[back to top][home]
<arena size="10.0, 10.0, 0.0" center="0.0, 0.0, 0.0">
...
</arena>
| Variable | Value | Description |
|---|---|---|
| size | double, double, double | Length x Width x Height; The size of the arena for the simulation. Typically, it isn't necessary to change the Height value from 0.0. |
| center | double, double, double | (X,Y,Z); Coordinate location of the center of the arena. |
[back to top][home]
<arena ... >
<floor id="floor" source="loop_functions" pixels_per_meter="50"/>
...
</arena>
| Variable | Value | Description |
|---|---|---|
| id | string | Arbitrary string ID for the floor object in ARGoS. |
| source | string | Do not change this. Connects the GetFloorColor function in the loop functions class to QT. |
| pixels_per_meter | integer | Changes the pixel draw density in the simulation. Higher values produce better graphics but slow down the simulation. |
[back to top][home]
<arena ... >
...
<distribute>
<position method="uniform" min="-1, -1, 0" max="1, 1, 0"/>
...
</distribute>
</arena>
| Variable | Value | Description |
|---|---|---|
| method | "uniform" | Uniform random distribution for the object defined within the distribute tag. |
| min | x, y, 0.0 | Minimum position the distributed object can be placed in. |
| max | x, y, 0.0 | Maximum position the distributed object can be placed in. |
[back to top][home]
<arena ... >
...
<distribute>
...
<orientation method="gaussian" mean="0, 0, 0" std_dev="360, 0, 0"/>
</distribute>
</arena>
The orientation determines which direction distributed objects are facing. In this context, we refer to the foot-bots and that they will be facing random directions when distributed into the arena.
| Variable | Value | Description |
|---|---|---|
| method | "gaussian" | Use a Gaussian distribution. |
| mean | 0.0, 0.0, 0.0 | (X, Y, Z); Set the mean (i.e. default) direction the robots are facing. |
| std_dev | 360.0, 0.0, 0.0 | Set the standard deviation (in this case 360 degrees of rotation) that the robots might be turned from the mean. |
[back to top][home]
<arena ... >
...
<distribute>
...
<entity quantity="6" max_trials="200">
...
</entity>
</distribute>
</arena>
| Variable | Value | Description |
|---|---|---|
| quantity | unsigned int | The number of robots to be placed in the simulation. |
| max_trials | unsigned int | The number of attempts to make at placing a robot in the case of collisions with other bots or obstacles. More important when generating robots in confined spaces. |
[back to top][home]
<arena ... >
...
<distribute>
...
<entity ... >
<foot-bot id="fb">
...
</foot-bot>
</entity>
</distribute>
</arena>
| Variable | Value | Description |
|---|---|---|
| id | string | Arbitrary string identification for foot-bot objects in ARGoS. |
[back to top][home]
<arena ... >
...
<distribute>
...
<entity ... >
<foot-bot ... >
<controller config="iAnt_c"/>
</foot-bot>
</entity>
</distribute>
</arena>
| Variable | Value | Description |
|---|---|---|
| config | string | Configures the foot-bot robot to use the logic defined in the iAnt controller class. Use the string ID defined in the <iAnt_controller id="..."> tag defined in the section of the ARGoS file. |
[back to top][home]
<physics_engines>
<dynamics2d id="dyn2d"/>
</physics_engines>
| Variable | Value | Description |
|---|---|---|
| id | string | The string ID of the physics engine used in ARGoS. Use the query command "argos3 -q physics_engines" to see a list of available engines. Dynamics2d is the default used. |
[back to top][home]
<media>
<led id="leds"/>
</media>
| Variable | Value | Description |
|---|---|---|
| id | string | Required to use foot-bots in ARGoS. Defines the string ID of the LED lights used by the foot-bot robots which are by default not used with the iAnt simulation. |
[back to top][home]
<visualization>
...
</visualization>
The settings contained inside of this tag adjust how the arena is viewed in the ARGoS GUI. Also, in order to run ARGoS without an active GUI comment out this section of the XML.
<!-- for example, remove the GUI/visualization like this
<visualization>
...
</visualization>
-->
PLEASE NOTE: If you remove the GUI, do not run experiments with length equal to zero as it will cause ARGoS to run indefinitely until canceled and will not properly log data.
[back to top][home]
<visualization>
<qt-opengl>
<camera>
<placement idx="0" position="0, 0, 10"
look_at="0, 0, 0" lens_focal_length="25"/>
...
<placement ... />
<placement idx="11" ... />
</camera>
...
</qt-opengl>
</visualization>
| Variable | Value | Description |
|---|---|---|
| idx | [0,11] | The GUI has 12 camera buttons that can be set up with specific viewing values. |
| position | x, y, z | The position of the camera above the arena. |
| look_at | x, y, z | The position the camera is pointing towards from its defined position. |
| lens_focal_length | double | Zoom value. Smaller values zoom out and greater values zoom in. |
[back to top][home]
<visualization>
<qt-opengl>
...
<user_functions label="iAnt_qt_user_functions"/>
</qt-opengl>
</visualization>
| Variable | Value | Description |
|---|---|---|
| label | "iAnt_qt_user_functions" | Registers the user functions class with qt-opengl. |
[back to top][home]