SUSF-Robotics-and-Software / phobos_sw

Software for the Phobos rover written in Rust
3 stars 0 forks source link

Phobos Software

Software for the University of Southampton Spaceflight Socieity's Phobos Rover.

Written in Rust.

Architecture

:warning: Note: The architecture is currently undergoing a rework, which is being tracked in this issue.

There are two executables and two libraries:

Scripts

rov_exec is capable of running scripts (which are stored in the scripts directory). To run a specific script append it's path to the end of the run command, such as:

RUST_BACKTRACE=1 cargo run --bin rov_exec scripts/demo_01.prs

Requirements

The following are required to be able to build and run the software:

Development and Executing

Before running the software setup an environment variable to point to the root of the phobos_sw directory. This is used to easily find the sessions and params directories. For example, in your .bashrc file:

export SUSF_PHOBOS_SW_ROOT="/c/Users/{USR}/Development/SUSF-Robotics-and-Software/phobos_sw"

For testing use cargo run --bin <BINARY_NAME> to execute a specific binary.

Use cargo build to just build and not run.

When running real events (like competition missions) use cargo run --release --bin <BINARY_NAME> to use release mode, which optimises the binaries and makes execution far faster.

rov_exec uses the eyre crate for error handling which produces nice backtraces. To enable them prepend RUST_BACKTRACE=1 to your run command. Will not work properly under release mode due to a lack of symbols.

I recommend using rust-analyser for VSCode linting/development.

Tools

Two tools (shell scripts) are provided for ease of use: