Central engineering reference and operations manual for the MRDT Autonomy Software.
View the Project on GitHub MissouriMRDT/Autonomy_Software
Return to RoveSoDocs Guides for Today, Tomorrow, and Forever.
The autonomy software utilizes CMake (version 3.24.3 or newer) as its meta-build system. The build configuration enforces modern C++20 language standards, compiler constraints, and aggressive compile-time optimizations to support high-performance embedded execution on the NVIDIA Jetson platform.
The top-level CMakeLists.txt executes a pre-configuration check verifying the host compiler version:
execute_process(
COMMAND gcc -dumpversion
OUTPUT_VARIABLE GCC_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT GCC_VERSION VERSION_EQUAL "10.0")
message(FATAL_ERROR "Only GCC 10.0 is allowed! Detected GCC version ${GCC_VERSION}.")
endif()
Rationale: Strict binary compatibility with NVIDIA JetPack 5.x, CUDA 11.4/12.x, and LibTorch runtime libraries requires GCC 10. Attempting to build with GCC 9 or GCC 11+ produces ABI incompatibilities or internal compiler segmentation faults during TorchScript and TensorRT template expansions.
CMAKE_CXX_STANDARD 20: Enables modern C++20 features (concepts, ranges, std::span, designated initializers, three-way comparisons, and coroutine primitives).CMAKE_CUDA_STANDARD 20: Aligns device CUDA compilation with host C++20 standards.if(NOT MSVC)
add_link_options("-fuse-ld=lld")
endif()
Replaces the default GNU ld or gold linkers with LLVM’s lld. This reduces final binary link times by up to 70% and substantially curtails peak RAM consumption on RAM-constrained Jetson systems.
set(CMAKE_UNITY_BUILD ON)
set(CMAKE_UNITY_BUILD_BATCH_SIZE 8)
Aggregates up to 8 translation units into unified compilation files. This dramatically reduces redundant header parsing overhead (particularly heavy headers like OpenCV, LibTorch, and ZED SDK), speeding up full builds and minimizing compiler process swapping.
Specify the build type during CMake generation:
cmake -B build -DCMAKE_BUILD_TYPE=<Type>
Release (Mandatory for Testing & Competition):
-O3.Debug (Local Developer Diagnostics Only):
-O0 and includes -g debug symbols.RelWithDebInfo:
-O2 -g. Provides optimized execution while preserving stack traces for core dump analysis.Options are toggled via -D<OPTION>=ON|OFF during configuration:
| Option | Default | Output Executable | Description |
|---|---|---|---|
BUILD_SIM_MODE |
OFF |
Autonomy_Software_Sim (when ON) |
Defines __AUTONOMY_SIM_MODE__=1. Switches sensor streams to consume WebRTC pixel streaming and local loopback sockets from Unreal Engine RoveSoSimulator. |
BUILD_TESTS_MODE |
OFF |
tests/* |
Enables CTest and builds GoogleTest unit and integration test suites in tests/. |
ENABLE_LIDAR_GEO_UTESTS |
OFF |
N/A | Enables specialized LiDAR database query and GeoPlanner unit tests that require physical USGS LiDAR data tiles (available from MissouriMRDT/USGS_Data). |
BUILD_CODE_COVERAGE |
OFF |
N/A | Injects GCC profiling flags (-O0 -g -fprofile-arcs -ftest-coverage --coverage) to generate gcov/lcov coverage reports in CI pipelines. |
BUILD_COVERAGE_WATCH |
OFF |
N/A | Enables real-time code coverage file-watching mode for development workflows. |
BUILD_VERBOSE_MODE |
OFF |
N/A | Generates verbose Makefiles displaying all raw compiler and linker commands during compilation. |
BUILD_EXAMPLES_MODE |
OFF |
examples/* |
Compiles standalone hardware verification examples for isolated subsystem testing. |
LINK_SHARED_ZED |
ON |
N/A | Links dynamically against the ZED SDK shared libraries (sl::Camera). Set to OFF if using custom static ZED builds. |
RC_CROSS_COMPILE |
OFF |
N/A | Cross-compiles the RoveComm communication library for both Linux and Windows environments. |
LIST_ALL_VARS |
OFF |
N/A | Dumps all active internal CMake cache variables and include paths to the console during configuration. |
The CMake build automatically locates and links the following system packages:
CUDA::cudart, CUDA::curand): Accelerates deep learning inferences and stereoscopic processing.Torch): PyTorch C++ front-end for executing YOLO TorchScript models.OpenCV): Computer vision algorithms, image manipulation, ArUco fiducials, and video encoding.sl::Camera): Stereolabs depth estimation, positional tracking, and spatial mapping.GeographicLib::GeographicLib): High-accuracy ellipsoidal geodesy and UTM coordinate conversions.duckdb): Embedded analytical spatial SQL engine for querying 2.5D USGS elevation maps.quill::quill): Low-latency asynchronous multi-threaded logging engine.