Skip to content

MissouriMRDT/Autonomy_Software

Repository files navigation

\mainpage

Mars Rover Design Team Logo

Autonomy Software C++

Autonomous Traversal and Object Detection for Rovers in C++


Introduction

Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! This repository contains the source code, documentation, and other resources for the development of the Autonomy Software for our Mars Rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.

API Documentation

Everytime a commit is made to the development branch, a GitHub Action is ran that automatically generates documentation for files, classes, methods, functions, namespaces, etc. using Doxygen. To ensure that Doxygen can properly document and use your comments, make sure to use the documentation templates! If you're running the development container in VSCode the templates can be automatically generated by typing /**<enter>. Regardless, all file, method, and function documentation must be use the template's style across the whole project.

Click here for full Autonomy Software API Documentation.

Here's the overall layout of the Autonomy_Software codebase:

Autonomy_Software Codebase Structure

Overview

The Autonomy Software project is organized into different directories, each serving a specific purpose. Here's a brief overview of the directories:

  • algorithms: Contains C++ files related to the algorithms used in our Rover project. These files implement the core functionality and logic necessary for autonomous navigation, perception, and decision-making.

  • interfaces: Contains C++ files related to the physical systems, boards, microcontrollers, or sensors on our Rover. These files handle the communication and interaction with external hardware components, ensuring seamless integration and data exchange.

  • states: Contains C++ files related to the state machine code of our Rover. These files define the different states and transitions that govern the Rover's behavior, allowing for efficient task execution and adaptability to changing conditions.

  • util: Contains utility scripts and helper functions used in our Rover project. These files provide various tools and functionalities to support development, debugging, and project management tasks, increasing overall efficiency and code reusability.

  • vision: Contains C++ files related to vision processing or computer vision algorithms used in our Rover. These files enable the Rover to process visual data, such as images or videos, and extract meaningful information for autonomous navigation and object recognition.

  • tests: Contains test cases and test scripts to ensure the correctness and reliability of our Autonomy Software. These files help validate the functionality and performance of our code, ensuring robustness and accuracy in real-world scenarios.

  • tools: Contains files that provide utility scripts, development tools, or miscellaneous functionalities for our project. These files assist in various development tasks, such as data analysis, visualization, or simulation, enhancing the overall development experience.

  • external: Contains external dependencies, libraries, or third-party modules used in our Rover project. These files are essential for the project's functionality and are organized based on their purpose or source, ensuring proper integration and compliance with licensing requirements.

  • examples: Contains example code snippets, demos, or sample implementations related to our Rover project. These files showcase specific functionalities, best practices, or usage scenarios, helping us understand and leverage the capabilities of our Autonomy Software effectively.

  • docs: Contains documentation files and resources for our Rover project. These files provide comprehensive and accessible documentation to guide developers, users, and contributors in understanding, configuring, and extending the Autonomy Software.

  • data: Contains data files and resources used in our Rover project. These files include sensor data, training data, configuration files, map data, simulation data, and log files, facilitating the development, testing, and analysis of our autonomy algorithms.

The src directory serves as the main source code directory and contains the algorithms, interfaces, states, util, and vision directories mentioned above.

Getting Started

  • See INSTALL.md for full installation instructions.
  • See CONTRIBUTING.md for full contribution instructions.
  • See DEBUG.md for full debugging and development instructions.

Running Autonomy

There are two primary run modes for our Autonomy Codebase.

  1. Standard Mode: Which operates using the Onboard Rover System and communicates using the standard RoveComm manifest and IP Addresses. To build and run Autonomy in this mode use the following commands:

    mkdir -p <Autonomy Install Location>/build
    cd <Autonomy Install Location>/build
    cmake -DBUILD_SIM_MODE=OFF ..
    make
    ./Autonomy_Software
    
  2. Simulation Mode: Which operates using the Webots Robot Simulator and uses the RoveComm manifest but sends all packets to local host instead. This allows the robot simulator to retrieve all the packets and run the simulation. To build and run Autonomy in this mode use the following commands:

    mkdir -p <Autonomy Install Location>/build
    cd <Autonomy Install Location>/build
    cmake -DBUILD_SIM_MODE=ON ..
    make
    ./Autonomy_Software_Sim
    

Additional Modes

To simplify and shorten the build time for development, we have moved the testing suites and installer to be locked behind a set of build arguments. These arguments are defaulted to OFF and can be combined and added with the simulation mode commands above.

  1. Test Mode: To build and run Autonomy with Unit and Integration Tests use the following commands:

    mkdir -p <Autonomy Install Location>/build
    cd <Autonomy Install Location>/build
    cmake -DBUILD_TESTS_MODE=ON ..
    make
    ./Autonomy_Software
    
  2. Install Mode: To build and run Autonomy with the install packager use the following commands:

    mkdir -p <Autonomy Install Location>/build
    cd <Autonomy Install Location>/build
    cmake -DBUILD_INSTALL_MODE=ON ..
    make
    ./Autonomy_Software