Documents

Guide

Python libraries

The science code is split in two. Numerical integration, aerodynamics, radiation pressure, gravity, magnetics, and the attitude laws are C++17 in cpp/, exposed as arlamx_cpp through pybind11. Geometry, the atmosphere query, the Gymnasium environment, and the trainers are Python. Install the set below from environment.yml.

mamba env create -n arlamx -f environment.yml
mamba activate arlamx
./build.sh
Keep the conda PyTorch environment.yml selects the conda-forge CPU build of PyTorch and conda-forge Stable-Baselines3. pip install torch on top of that environment replaces it, often with a CUDA wheel, and the trainer stops importing. requirements.txt is only a hint for a machine with no conda. On that path, install a CPU torch from the PyTorch index first, then pip install -r requirements.txt.

Installed for the plant and the trainer

PackageWhere it comes fromWhat ARLAMX uses it for
Python 3.12conda-forge./build.sh refuses any other version. The extension is tagged for 3.12.
NumPyconda-forgePlate arrays, state vectors, and the arrays passed into the C++ simulator.
SciPyconda-forgeIndependent checks in python main.py verify and the tests. The plant itself does not integrate with SciPy.
PyYAMLconda-forgeEvery file under config/.
Matplotlibconda-forgeDecay plots, simplification figures, campaign figures.
Gymnasiumconda-forgeArlamxV2Env. The advisor API the trainers speak.
PyTorchconda-forge, CPUThe policy and value networks. Training is FP32.
Stable-Baselines3conda-forgePPO, SAC, and TD3, plus VecNormalize. Cloudpickle rides along so those zips reload.
TensorBoardconda-forgeLogs under outputs/models/<id>/logs/.
pymsispip, inside the env fileNRLMSIS 2.1 and NRLMSISE-00. It is not on conda-forge. atmosphere.py calls it.
trimeshconda-forgeLoads STL, OBJ, and STEP into vertices and faces for the simplifier.
cascadiopip, inside the env fileOpenCASCADE tessellation so trimesh can read STEP. STL and OBJ do not need it.
pybind11conda-forgeGenerates the Python module from cpp/src/bindings.cpp. ./build.sh asks this interpreter for the CMake directory.
CMake, a C++ compiler, makeconda-forgeBuild the plant. C++17, position-independent code, no Eigen.
pytestconda-forgepython main.py test.

Optional

PackageWhen
reportlabpython main.py plot build_mpc_report writes a PDF. Nothing else imports it.
BasiliskOptional gravity referee. tests/basilisk_ref/ skips cleanly when it is absent. The plant does not link it.
CSPICEThe C++ API can load a SPICE kernel for the Sun and Moon. The shipped build does not link CSPICE. The high physics preset uses the analytic Meeus ephemeris.

Standard library, used directly

The trainers and the command line also use the Python standard library throughout: argparse, pathlib, dataclasses, concurrent.futures for the Monte Carlo tools, and subprocess when main.py launches pytest. Those need no extra install.