Trying Out SIERRA

If you just want to try SIERRA out with a pre-existing Project without first defining your own, the steps to do so below. I assume that all repositories are cloned into $HOME/research; adjust the paths accordingly if you clone things somewhere else.

  1. Install OS packages (if you don’t see your OS below you will have to find and install the equivalent packages).

    Install the following required packages with apt install:

    • parallel

    • cm-super

    • texlive-fonts-recommended

    • texlive-latex-extra

    • dvipng

    • psmisc

    Install the following optional packages with apt install:

    • pssh

    • ffmpeg

    • xvfb

    If you are on a different Linux distribution you will have to find and install the equivalent packages.

    Important

    SIERRA will not work correctly in all cases if the required packages (or their equivalent) are not installed! It may start, it might even not crash immediately depending on what you are using it to do. If you are missing an optional package for a feature you try to use, you will get an error.

  2. Install SIERRA:

    pip3 install sierra-research
    
  3. Setup your chosen Platform:

    Install ARGoS via your chosen method (from source or via .deb). Check that argos3 is found by your shell.

    Important

    If argos3 is not found by your shell then you won’t be able to do anything useful with SIERRA!

  4. Download and build the super-simple SIERRA sample project for your chosen Platform:

    Based on the foraging example from the ARGoS website:

    git clone https://github.com/jharwell/sierra-sample-project.git
    cd sierra-sample-project/argos
    git checkout devel
    mkdir -p build && cd build
    cmake -DARGOS_INSTALL_DIR=<path> ..
    make
    

    ARGOS_INSTALL_DIR should point to the directory you have installed the version of ARGoS you want to use for the trial (installed, not compiled!). This is used instead of the FindARGoS() cmake functionality to support having multiple versions of ARGoS installed in multiple directories.

  5. Setup runtime environment:

    1. Set SIERRA_PLUGIN_PATH:

      export SIERRA_PLUGIN_PATH=$HOME/research/sierra-sample-project/projects
      
    2. Set ARGOS_PLUGIN_PATH:

      export ARGOS_PLUGIN_PATH=$HOME/research/sierra-sample-project/argos/build:<ARGOS_INSTALL_DIR>/lib/argos3
      

      Where <ARGOS_INSTALL_DIR> is the prefix that you installed ARGoS to.

  6. Run SIERRA (invocation inspired by SIERRA Usage By Example). You can do this from any directory! (yay SIERRA!)

    sierra-cli \
    --sierra-root=$HOME/research/exp \
    --template-input-file=exp/argos/template.argos \
    --n-runs=4 \
    --platform=platform.argos \
    --project=argos_project \
    --physics-n-engines=1 \
    --controller=foraging.footbot_foraging \
    --scenario=LowBlockCount.10x10x1 \
    --batch-criteria population_size.Log8 \
    --with-robot-leds \
    --with-robot-rab \
    --exp-overwrite
    

    This will run a batch of 4 experiments using the argos_project.so C++ library. The swarm size will be varied from 1..8, by powers of 2. Within each experiment, 4 copies of each simulation will be run (each with different random seeds), for a total of 16 ARGoS simulations. On a reasonable machine it should take about 1 minute or so to run. After it finishes, you can go to $HOME/research/exp and find all the simulation outputs, including camera ready graphs! For an explanation of SIERRA’s runtime directory tree, see SIERRA Runtime Directory Tree. You can also run the same experiment again, and it will overwrite the previous one because you passed --exp-overwrite.

    Note

    The --with-robot-rab and --with-robot-leds arguments are required because robot controllers in the sample project use the RAB and LED sensor/actuators, and SIERRA strips those tags out of the robots <sensors> and <actuators> and <media> parent tags by default to increase speed and reduce the memory footprint of ARGoS simulations.