-
Notifications
You must be signed in to change notification settings - Fork 11
Windows Installation
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 MinGW 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 MinGW 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 MinGW manually.
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. In a command prompt:
$ cd <desired>/<directory>
$ git clone https://github.com/heronsystems/OpenMACE
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);
In order to properly build MACE, you will need to set the MACE_ROOT environment variable. You can do this in the Qt Creator IDE, or add them permanently.
Open the Windows Control Panel and search for "Environment Variables." Select Edit the system environment variables and select "Environment Variables..." You should see the "Environment Variables" window appear:

Select "New..." and add an environment variable with the name MACE_DIGIMESH_WRAPPER and the value set to the root directory such that %MACE_DIGIMESH_WRAPPER%/include and %MACE_DIGIMESH_WRAPPER%/lib resolves to the appropriate directories. If the library was cloned into C:/Code, the variable value would be C:/Code/MACEDigiWrapper.
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).

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.
Using the Qt Creator IDE, open the OpenMACE/src.pro file, making sure to configure the project using a MinGW 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.

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. Once the installer installs the required Node packages, run the following commands.
Open a command prompt 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 start:app command above may take a few moments to actually start the GUI, 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.
If you eventually wish to run MACE from the command line, you will need to add %MACE_ROOT%\lib and %MACE_ROOT%\bin to the PATH environment variable. Under System variables, select Path and then click Edit. In the dialog that appears, select New and add %MACE_ROOT%\lib. Do the same for %MACE_ROOT%\bin, then press OK.
Since MACE is built using some Qt libraries, we should also add Qt to the Path variable for command-line execution. Using the same process as above, add the path to your Qt MinGW libraries. As an example, if Qt was installed using the default methods, then you would add the following to your PATH variable (substituting the Qt version number for the one you installed):
C:\Qt\5.7\mingw53_32\lib
C:\Qt\5.7\mingw53_32\bin
Finally, MACE relies on Octomap (in the tools directory) for path planning functionalities. Add the octomap library path to the PATH variable using the same process as above. The path to Octomap is %MACE_ROOT%\tools\octomap\bin, if the default installation was followed for MACE Tools libraries.