-
Notifications
You must be signed in to change notification settings - Fork 276
Jarvis Build System
Jarvis is MRover's custom build system. It is the tool used to build and execute rover applications. After creating a simple project.ini
file, an application may be built with the build
command and executed with the exec
command, regardless of language.
- Introduction
- Building Dependencies
- Configuring an Application
- Building an Application
- Running an Application
- Troubleshooting
Under the hood, Jarvis is a bash script that wraps python code. To invoke jarvis
, run the bash script of the same name in the workspace root directory. When you run the script for the first time, Jarvis will bootstrap itself.
$ ./jarvis
To save keystrokes, create an alias for jarvis
.
$ echo "alias jarvis=\"<path to workspace>/mrover-workspace/jarvis\"" >> ~/.bashrc
Note: Be sure to use >>
rather than >
in the above command. >>
will append the output of echo
to the specified file, while >
will overwrite the file.
Now, when you invoke jarvis
, you can do so without the leading ./
.
$ jarvis
The remainder of this guide will assume you have configured the alias for jarvis
.
When you build an application, Jarvis ensures that the required third-party and pip dependencies have been installed. To force Jarvis to install dependencies, you can run
$ jarvis dep
By default, this installs all third-party dependencies contained in the 3rdparty
sub-directory (LCM, RapidJSON, and the Phoenix library) and all pip dependencies specified in the pip_deps
sub-directory. There, requirements are broken into multiple files:
-
requirements.txt
contains general pip dependencies for the repository -
onboard_requirements.txt
contains pip dependencies required only by certainonboard
programs.
Some dependencies are large, and you may want to omit those that you do not require when using Jarvis. For example, some of the pip dependencies required by onboard
programs are too large to be installed on a BeagleBone Black. Jarvis allows the user to create an mrover.site
file in the user's home directory (~/
) to configure which dependencies should be installed on the current platform. The following example mrover.site
file can be found in mrover-workspace/ansible/roles/beaglebones/files/
and is used to configure which dependencies should be installed when building programs on BeagleBone Blacks:
[third_party]
rapidjson=False
phoenix=False
[pip_deps]
onboard=False
- The
[third_party]
header tells Jarvis that this section of the file describes which of the third-party dependencies to install. Because this is on a BeagleBone Black, therapidjson
andphoenix
dependencies are not required (there are currently no C++ rover applications that run on the BeagleBones, andphoenix
is only required to interface with the Talon SRX motor controllers. See the Software Overview page for more details). - The
[onboard]
header tells Jarvis that this section of the file describes which of the pip dependencies to install. Because this is on a BeagleBone Black, the dependencies inonboard_requirements.txt
are not required and so Jarvis ignores them to save the time required to build them.
Currently, the following options may be specified in an mrover.site
file:
Header | Options |
---|---|
[third_party] |
lcm , rapidjson , phoenix
|
[pip_deps] |
onboard |
Something not right? Contact the Software Branch lead.