last_letter
Software libraries for UAV simulation.
Repository layout
lib/ the simulation library: C++ core, its Python package and the tests
lib/tools/ standalone analysis scripts and the packaging test container
frontends/ programs that drive the library, currently the ArduPilot SITL bridge
models/ aircraft recipes, installed to $HOME/last_letter_models
docs/ Sphinx documentation
The C++ library is called last_letter_lib, which is also the name of its CMake
target and of liblast_letter_lib.so; the suffix separates it from the frontends
that link it. The Python package is simply last_letter.
Build instructions
Prerequisites
CMake 3.28 or newer is required. This is newer than the 3.22 shipped by Ubuntu
22.04; install a current one with uv tool install cmake or from the
Kitware APT repository.
The following system packages are also expected. On Debian/Ubuntu:
sudo apt install build-essential git libeigen3-dev libboost-dev liblz4-dev libzstd-dev
build-essential— a C++17 compiler.git— the remaining dependencies (yaml-cpp, DataTamer and, for the tests, GoogleTest) are cloned at configure time by CMake'sFetchContent, so the first configuration of a build directory needs network access.libeigen3-dev— Eigen 3, the linear algebra library. Located withfind_package(Eigen3).libboost-dev— only the header-only parts of Boost are used (boost/array.hppand Boost.Odeint), so the compiled Boost libraries are not needed.liblz4-dev,libzstd-dev— the compression libraries used by mcap, which is vendored inside DataTamer. Without them the configure step fails in mcap'sFindZSTD.cmake.
Building the Python bindings additionally needs the Python development headers,
python3-dev. pybind11 itself is provided by the build environment and does
not have to be installed system-wide.
To build and install the C++ code
cmake -S . -B build && cmake --build build && cmake --install build
Installation defaults to the $HOME/.local prefix, so no sudo is needed.
The library will be installed in $HOME/.local/lib.
Override it with -DCMAKE_INSTALL_PREFIX=<path>. Note that the aircraft models
are always installed to $HOME/last_letter_models, independently of the prefix.
A nix-shell pure configuration has been provided which can be optionally used.
To build the ArduPilot bridge binary run
cmake -S . -B build -DLAST_LETTER_BUILD_ARDUPILOT=ON && cmake --build build && cmake --install build
The executable will be installed in $HOME/.local/bin. Ensure it is on your path.
To use the C++ library from another CMake project
The install exports a CMake package, so a downstream project only needs
find_package(last_letter_lib REQUIRED)
target_link_libraries(myapp PRIVATE last_letter_lib::last_letter_lib)
That imported target carries the include directory and the Eigen and Boost
requirements, so no paths need hardcoding. If the library was installed to a
prefix CMake does not search by default, point at it with
-DCMAKE_PREFIX_PATH=<prefix>.
To build the Python code
last_letter is distributed as a source distribution only — there is no
prebuilt wheel to download. Installing it compiles the C++ library on your own
machine, so the prerequisites above must be in place first, and the install
needs network access because CMake clones yaml-cpp and DataTamer while it
configures. CMake itself does not have to be installed: the build fetches a
suitable version if the system one is too old.
To build and install the Python package in your current Python environment enter:
uv pip install <path_to_last_letter> [--force-reinstall]
The aircraft models and the Python package
A wheel carries the aircraft models inside the package, and
from last_letter.paths import models_path
returns wherever they can be found — $HOME/last_letter_models if it exists,
the packaged copy otherwise. The C++ library only knows the first of those, so
after installing from a wheel, run
last-letter-install-models [--force]
to copy them out to $HOME/last_letter_models. The copy overlays the
destination instead of replacing it, so aircraft of your own kept there are left
alone.
Developers
If you wish to modify and hopefully contribute to last_letter, please read DEVELOPERS.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file last_letter-2.100.0.tar.gz.
File metadata
- Download URL: last_letter-2.100.0.tar.gz
- Upload date:
- Size: 514.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88bfe78c25a32e2b9b5674de9a3bf11d3e6a15ff92f49261a2bf831e6f46f59d
|
|
| MD5 |
2748d0e31348c9691950915d5e7f5495
|
|
| BLAKE2b-256 |
a850e73dbdb8eeb49a8178c4acc55edace7cfd5516bbfc9f5535e1488830a395
|