Skip to content

itichi/argos3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

ARGoS README

What is ARGoS?

ARGoS is a physics-based simulator designed to simulate large-scale robot swarms. Benchmark results show that ARGoS can perform physics-accurate simulation involving thousands of robots in a fraction of real time. ARGoS' main features are:

  • Multi-threaded and deeply modular architecture, more flexible than any simulator with equivalent features;

  • The possibility to run multiple physics engines at the same time;

  • The possibility to divide the physical space in region, and assign different regions to different physics engines.

Starting from version 3, ARGoS is released under the terms of the MIT license.

Downloading ARGoS

You can download a binary package of ARGoS from http://iridia.ulb.ac.be/argos/download.php. Alternatively, you can download the development sources through git:

$ git clone https://github.com/ilpincy/argos3.git argos3

Compiling ARGoS

If you downloaded the sources of ARGoS and want to compile its code, you need:

  • A UNIX system (Linux or MacOSX; Microsoft Windows is not supported)

  • g++ >= 4.2

  • cmake >= 2.6

If you want to compile the simulator, you need:

  • gsl >= 1.15

  • FreeImage >= 3.15

The OpenGL-based graphical visualization is compiled only if the following libraries are found:

  • Qt >= 4.6

  • freeglut >= 2.6.0

If you want to create the documentation you need:

  • To create the API:

    • Doxygen >= 1.7.3

    • Graphviz/dot >= 2.28

  • To create the HTML version of this README:

    • asciidoc >= 8.6.2

If you want to create the Lua wrapper you need:

  • lua == 5.1

Compiling the code

The compilation of ARGoS is configured through CMake.

Fast compilation instructions

Compiling the ARGoS simulator
$ cd argos3
$ mkdir build_simulator
$ cd build_simulator
$ cmake ../src
$ make
Compiling ARGoS for a robot
$ cd argos3
$ mkdir build_myrobot
$ cd build_myrobot
$ cmake -DARGOS_BUILD_FOR=myrobot ../src
$ make
Compiling the documentation
$ cd argos3
$ cd build_simulator # or 'cd build_myrobot'
$ make doc
ARGoS sources under Eclipse

To use Eclipse with the ARGoS sources, you must have the CDT installed (http://www.eclipse.org/cdt/). Optionally, you can also install CMakeEd (http://cmakeed.sourceforge.net/) to modify the CMakeLists.txt files comfortably within Eclipse.

To configure the ARGoS sources for Eclipse, execute CMake as follows:

$ cd argos3
$ cmake -G "Eclipse CDT4 - Unix Makefiles" src/

Now open Eclipse. Click on FileImport…​, select Existing project into workspace, and click on Next. Set the base argos3 directory as the root directory in the dialog that appears. Click on Next and you’re ready to go.

Advanced compilation configuration

The compilation of ARGoS can be configured through a set of CMake options:

Variable Type Meaning [default value]

CMAKE_BUILD_TYPE

STRING

Build type (Debug, Release, etc.) [empty]

CMAKE_INSTALL_PREFIX

STRING

Install prefix (/usr, /usr/local, etc.) [/usr/local]

ARGOS_BUILD_FOR

STRING

Target of compilation (simulator or robot name) [simulator]

ARGOS_THREADSAFE_LOG

BOOLEAN

Use or not the thread-safe version of LOG/LOGERR. [ON]

ARGOS_DYNAMIC_LOADING

BOOLEAN

Compile (and use) dynamic loading facilities [ON]

ARGOS_USE_DOUBLE

BOOLEAN

Use double (ON) or float (OFF) [ON]

ARGOS_DOCUMENTATION

BOOLEAN

Create documentation (API, manpage, etc.) [ON]

You can pass the wanted values from the command line. For instance, if you wanted to set explictly all the default values, you would write:

$ cd argos3/build_simulator
$ cmake -DCMAKE_BUILD_TYPE=Debug \
        -DCMAKE_INSTALL_PREFIX=/usr/local \
        -DARGOS_BUILD_FOR=simulator \
        -DARGOS_THREADSAFE_LOG=ON \
        -DARGOS_DYNAMIC_LOADING=ON \
        -DARGOS_USE_DOUBLE=ON \
        -DARGOS_DOCUMENTATION=ON \
        ../src
Important
When ARGOS_BUILD_FOR is set to simulator, ARGOS_THREADSAFE_LOG and ARGOS_DYNAMIC_LOADING must be ON.
Tip
For production environments, it is recommended to compile ARGoS with CMAKE_BUILD_TYPE set to Release. If you want to debug ARGoS, it is recommended to set CMAKE_BUILD_TYPE to Debug. The other standard settings (empty and RelWithDebInfo) are supported but should be avoided.

Using the ARGoS simulator from the source tree

Running the ARGoS simulator

If you don’t want to install ARGoS on your system, you can run it from the sources tree. In the directory build_simulator/ you’ll find a bash script called setup_env.sh. Executing this script, you configure the current environment to run ARGoS:

$ cd argos3
$ cd build_simulator
$ . setup_env.sh     # or 'source setup_env.sh'
$ cd core
$ ./argos3 -q all    # this shows all the plugins recognized by ARGoS

If you execute ARGoS with the graphical visualization, you’ll notice that icons and textures are missing. This is normal, as ARGoS by default looks for them in the default install location. To fix this, you need to edit the file $HOME/.config/Iridia-ULB/ARGoS.conf as follows:

[MainWindow]
#
# other stuff
#
icon_dir=/path/to/argos3/src/plugins/simulator/visualizations/qt-opengl/icons/
texture_dir=/path/to/argos3/src/plugins/simulator/visualizations/qt-opengl/textures/
#
# more stuff
#
Important
You can’t install ARGoS system-wide and run the source version at the same time. If you intend to run ARGoS from the sources, you must uninstall it from the system.

Debugging the ARGoS simulator

You can debug the ARGoS code using gdb. Since the code in scattered across multiple directories, you need a .gdbinit file. Luckily for you, this file is created automatically when you compile ARGoS. To use it, you just need to remember to run the ARGoS simulator from the build_simulator/core/ directory:

$ cd argos3/build_simulator/core
$ gdb ./argos3

Installing ARGoS from the compiled binaries

To install ARGoS after having compiled the sources, it is enough to write:

$ cd argos3
$ cd build_simulator # or 'cd build_myrobot'
$ make doc           # documentation is required!
$ sudo make install

Alternatively, one can create a package. To build all the packages supported by your system, run these commands:

$ cd argos3
$ cd build_simulator       # or 'cd build_myrobot'
$ make doc                 # documentation is required!
$ git tag -a X.Y.Z-release # give the package a unique version
                           # the format must be as shown
                           # X       = version major
                           # Y       = version minor
                           # Z       = version patch
                           # release = a textual label
$ sudo make package

This typically creates a self-extracting .tar.gz archive, a .tar.bz2 archive, a .zip archive, and a platform-specific archive (.deb, .rpm, or a MacOSX package). You can determine which packages to create by setting the variables CPACK_BINARY_DEB, CPACK_BINARY_RPM, CPACK_BINARY_STGZ, CPACK_BINARY_TBZ2, CPACK_BINARY_TGZ, CPACK_BINARY_TZ.

Important
the creation of source packages through the command make package_source is not supported.

An easier option is to install ARGoS from a package distributed at http://iridia.ulb.ac.be/argos/download.php.

About

A parallel, multi-engine simulator for heterogeneous swarm robotics

Resources

Stars

Watchers

Forks

Packages

No packages published