Trajectory Planner Linux / WSL

trajectory_planner is an optional add-on for Generalized_ADCS.

The module is a C++ library built with Pybind and imported into the Python codebase. It must be compiled from source on Linux and WSL.

Canonical instructions (including both Windows and Linux) are maintained in:

For algorithm background, see:

Prerequisites

Ensure the following system packages are installed:

sudo apt update
sudo apt install -y \
  cmake \
  g++ \
  libarmadillo-dev \
  libboost-math-dev

Build Instructions

From the repository root:

cd trajectory_planner
mkdir -p build
cd build

Configure the build:

cmake .. \
  -DCMAKE_BUILD_TYPE=Debug \
  -DPython3_EXECUTABLE=$(which python3) \
  -DPYTHON_EXECUTABLE=$(which python3) \
  -DPYTHON_INCLUDE_DIR=$(python3 -c "from sysconfig import get_paths; print(get_paths()['include'])") \
  -DPYTHON_INCLUDE_DIRS=$(python3 -c "from sysconfig import get_paths; print(get_paths()['include'])") \
  -DPYTHON_LIBRARY=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")/libpython3.12.so \
  -DPYTHON_LIBRARIES=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")/libpython3.12.so

Compile:

make -j$(nproc)

Debugging

To debug the C++ extension, install GDB:

sudo apt install gdb

Verify installation:

which gdb