Installation and Setup¶
This page covers how to install and set up MOLARS, including dependencies and build instructions.
Dependencies¶
C++ Dependencies¶
MOLARS depends on the following C++ libraries:
- LCM - Lightweight Communications and Marshalling library
- Eigen 3 - Template library for linear algebra
- BehaviorTree.CPP - Framework to create behavior trees
Install these dependencies using your package manager or by building from source.
Additionally, MOLARS depends on the following repositories, which are imported via vcstool:
- compas_lcmtypes - Common LCM types used by CoMPAS Lab projects
Python Dependencies¶
MOLARS requires Python 3.12 with the following libraries:
- lcm - Python bindings for LCM
- lcmutils - Utilities for working with LCM in Python
- fastapi - Web framework for building APIs
- uvicorn - ASGI server for FastAPI
These can be installed using pip:
Building MOLARS¶
Clone and Import Dependencies¶
First, clone the MOLARS repository:
Then, import the dependencies using vcstool:
Build the Project¶
Create a build directory and build the project using CMake:
If you encounter build issues, please refer to the documentation for the dependencies listed above and submit an issue to the MOLARS repository.
Running MOLARS¶
MOLARS is composed of several components that run as separate processes. Before running any of the components, source the setup.bash file:
Starting the Control Server¶
The control server provides an interface for issuing 6-DoF control commands to the AUV. It depends on the controller and state estimator, which should be running before starting the control server.
Where:
<report reference>is the LCM channel on which the controller reports its target 6-DoF reference<state>is the LCM channel on which the state estimator is publishing the current state<reference>is the LCM channel on which the controller is listening for a 6-DoF reference<global state>is the LCM channel on which the estimator is publishing the global state (if not applicable, use the same channel as<state>)
Starting the Navigation Server¶
The navigation server manages the navigation stack and coordinates planning, path following, and obstacle avoidance.
Starting the Mission Server¶
The mission server manages the execution of missions by coordinating the other components.
Starting the API¶
MOLARS provides a REST API for interacting with the system via HTTP.
Starting the REPL¶
MOLARS also provides a Python REPL for interactive control:
This will start an interactive Python shell where you can run commands to interact with the MOLARS system. The REPL automatically imports functions from several of the relevant mission_script modules for convenient access to the mission script API (see scripting documentation).