Expand description
§TrajoptLib
TrajoptLib is a library for generating time-optimal drivetrain trajectories subject to waypoint, kinematic, and dynamic constraints.
§Features
- Currently only supports swerve drives with arbitrary module configurations
- Position and velocity constraints at each waypoint
- Keep-out circle and polygons
- Custom physical constraints of robot
- Custom bumper shape
§Build
§Dependencies
- C++23 compiler
- On Windows 11 or greater, install Visual Studio Community 2022 and select the C++ programming language during installation
- On Ubuntu 24.04 or greater, install GCC 14 via
sudo apt install g++-14 - On macOS 14 or greater, install the Xcode 15.3 command-line build tools via
xcode-select --install
- CMake 3.21 or greater
- On Windows, install from the link above
- On Linux, install via
sudo apt install cmake - On macOS, install via
brew install cmake
- Rust compiler
- Sleipnir
- Catch2 (tests only)
Library dependencies which aren’t installed locally will be automatically downloaded and built by CMake.
§C++ library
On Windows, open a Developer PowerShell. On Linux or macOS, open a Bash shell.
# Clone the repository
git clone git@github.com:SleipnirGroup/Choreo
cd Choreo/trajoptlib
# Configure
cmake -B build -S .
# Build
cmake --build build
# Test
ctest --test-dir build --output-on-failure
# Install
cmake --install build --prefix pkgdirThe following build types can be specified via -DCMAKE_BUILD_TYPE during CMake configure:
- Debug
- Optimizations off
- Debug symbols on
- Release
- Optimizations on
- Debug symbols off
- RelWithDebInfo (default)
- Release build type, but with debug info
- MinSizeRel
- Minimum size release build
§Rust library
On Windows, open a Developer PowerShell. On Linux or macOS, open a Bash shell.
# Clone the repository
git clone git@github.com:SleipnirGroup/Choreo
cd Choreo/trajoptlib
cargo buildModules§
- error
- Solver error types.
Structs§
- Differential
Drivetrain - A differential drivetrain physical model.
- Differential
Trajectory - Differential trajectory.
- Differential
Trajectory Generator - This trajectory generator class contains functions to generate time-optimal trajectories for differential drivetrain types.
- Differential
Trajectory Sample - Differential trajectory sample.
- Pose2d
- Represents a 2D pose with translation and rotation.
- Swerve
Drivetrain - A swerve drivetrain physical model.
- Swerve
Trajectory - Swerve trajectory.
- Swerve
Trajectory Generator - This trajectory generator class contains functions to generate time-optimal trajectories for several drivetrain types.
- Swerve
Trajectory Sample - Swerve trajectory sample.
- Translation2d
- Represents a translation in 2D space.
Functions§
- cancel_
all - Cancels all running generations.