-
Notifications
You must be signed in to change notification settings - Fork 11
Linux Installation
For ease of installation on Ubuntu 18.04, a set of installation scripts are included to build the repository along with some prerequisites. To install the prerequisites, first run the installPrereqs.sh script as sudo:
sudo ./installPrereqs.sh -r
Note that the -r option is included to install ROS Melodic on Ubuntu 18.04. If you do not wish to install ROS, simply omit this flag.
Once the prerequisites are installed, run the installOpenMACE.sh script:
./installOpenMACE.sh -t -g
If this is the first time installing OpenMACE, make sure to include the -t flag to build the tools libraries. If you re-run this script after making code changes, you can omit this flag. The -g flag installs the default GUI. If a different GUI is being used or you are building the GUI separately, omit this flag.
Prior to building on Linux, you should make sure that your distribution is up to date. Run sudo apt-get update && sudo apt-get upgrade prior to running anything of the following steps.
To clone the repository, you will need to install git command line interface. Once installed, test that the installation was successful by typing git --version in a terminal window.
To install various third party libraries needed for MACE, you will also need to install CMake. Once installed, test that the installation was successful by typing cmake --version in a terminal window.
Before compiling MACE from source, you will need a few things. First, you will need Qt (Download installer from HERE) and the Qt Creator IDE that comes with it. MACE currently depends on minimal libraries from Qt, however the easiest way to install MACE is still to use the Qt Creator IDE. Download the default installer and follow the steps. When you get the the components screen, make sure you select gcc under the Qt version you prefer (other build options such as Android build components are not required). For most users, the latest version of Qt is sufficient. The screenshot below shows an example of the components menu--note that the version numbers of Qt and gcc may not be up to date, this is just an example:

If you choose to install Qt using a method other than the online installer, you may need to install other build tools. However, this installation has not been tested without using the default Qt installation steps.
If you wish to use the packaged user interface, you will need to install NodeJS for your platform as well as Yarn. For NodeJS, download the recommended installer and follow the default steps. Do the same for Yarn.
If you wish to use a MAVLink simulated vehicle, the ArduPilot simulation has been used extensively with MACE. To install, follow the instructions HERE.
Clone the MACE repository distributed by Heron Systems by navigating to wherever you wish to clone the repository. An example would be /_code. In a command prompt:
$ cd /_code
$ git clone https://github.com/heronsystems/MACE
In order to build MACE, we must add a the MACE_ROOT environment variable to build MACE.
Add an environment variable MACE_ROOT set to that root such that %MACE_ROOT%/include and %MACE_ROOT%/lib resolves to the appropriate directories. Add the following lines to your ~/.bashrc file:
export MACE_ROOT=/home/user/_code/OpenMACE
export PATH=$PATH:/home/user/_code/OpenMACE/lib
Make sure to change the paths to where you cloned MACE (i.e. replace /home/user/_code with your directory structure). Also, run source ~/.bashrc for the changes to take effect.
In the Qt Creator IDE with the MACE project open, set the MACE_ROOT environment using the interface in the "Projects" tab (see screenshot below).

Prior to building MACE, there are third party Tools libraries that must be installed. Follow the instructions on the wiki to install each library (Installing Tools Libraries);
Similar to the MACEDigiWrapper build steps above, you will need to add OpenMACE/bin, OpenMACE/include, and OpenMACE/lib directories.
There are two options when building the MACE application. Follow the instructions for your preferred method:
After making those directories, go to the Projects tab and select Build. Add a build step using the dropdown and select Make. In the Make arguments: box, add install. Generated headers and libraries should install to the /include and /lib directories off the root of the project made prior to building (See the screenshots above in the Build steps -> Digimesh Library section for more detail).
Using the Qt Creator IDE, open the OpenMACE/src.pro file, making sure to configure the project using a gcc enabled kit. Next, right click on the top level src directory and run QMake. Once this finishes, right click and run Build on the entire project. Note that this may take a while.

Next, change directory into the MACE root directory and build the project:
$ cd /_code/MACE
$ mkdir build
$ cd build
$ qmake ../src/src.pro
$ make
$ make install
To make library installs easier, we first want to add a *.conf file that points to OpenMACE/lib directories. In the example below, MACE was cloned in the /_code directory. Make sure to replace this with the appropriate path. This will allow us to "install" MACE libraries in order to run MACE via the command line.
$ echo "/_code/OpenMACE/lib" > /etc/ld.so.conf.d/MACE.conf
After building any changes in the MACE libraries, run the following command:
$ sudo ldconfig
To run the MACE GUI, you will need NodeJS installed and configured as well as Yarn. Once configured, navigate to OpenMACE/MACE_Frontend/ and run yarn install. Once the installer installs the required Node packages, run the following commands.
Open a terminal and run:
$ yarn start:app
If successful, the MACE GUI will run, and you should see a blank map similar to the one below. Note that the yarn start:app command above may take a few moments to actually start the GUI while it waits for the watch command to finish, and you may see a white screen while the command finishes.

To test your installation, you can run a simple test with a simulated vehicle connected to a MACE instance, which can be displayed and controlled via the MACE GUI. This test is outlined in the MACE Living and Breathing Test wiki page.