Skip to content
James Edmondson edited this page Sep 13, 2018 · 19 revisions

Getting Started with MADARA

We've tried to make getting started with MADARA for multi-agent programming as easy as possible. Installation and update is usually as simple as one line on a command line terminal. You can program with reactive or declarative paradigms, use real-time scripting languages, and built-in containers for C++, Java, and Python. But how do you get started? Let's get you going with your first programs.


Installation

Installation Wiki

Our recommendation is to use Linux and use the Linux build scripts. They're used by our most concentrated user base. The main question you want to ask yourself is what all do I really want to install? because MADARA and GAMS have a lot of features. So, let's go over a common install. How about installing MADARA, GAMS with UDP and ZMQ networking transports that are SSL-capable?

Installation Example

export CORES=4
export GAMS_ROOT=$HOME/gams
cd $HOME
$GAMS_ROOT/scripts/linux/base_build.sh prereqs madara gams zmq ssl

In the above, we set CORES to 4 to say we want to build with 4 threads for speed. We set GAMS_ROOT to our home directory and a new gams directory, move into the home directory, and install all of our prerequisites and software. It should be as simple as that.

Update Example

To update, you can either run what you did earlier or add the noclean option to the base_build.sh command. If you want to see help for what all base_build.sh supports, try help or --help.

Ludicrous Speed Update Example

export CORES=4
export GAMS_ROOT=$HOME/gams
cd $HOME
$GAMS_ROOT/scripts/linux/base_build.sh prereqs madara gams zmq ssl noclean

Essentially, noclean tells the build system that you don't want to remove previous object files and want to use make depend to track any changes. This is appropriate if you haven't changed any build options since you last built. If your MADARA or GAMS installs malfunction, you may want to try removing the noclean option and building fresh, but the noclean option is a great way to have fast builds and works for almost all users.


Creating Your First C++ Program

There are two ways to make a MADARA or GAMS application with all of the libraries and dependencies linked appropriately. The first way is to use the $GAMS_ROOT/scripts/projects/gpc.pl script to generate a custom controller with a MakefileProjectCreator build system that can target builds to Windows, Linux, and Apple. However, this can also create a lot of scaffolding and command arguments that you don't need. So, let's go over the core linking requirements for C++.