Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sleipnirgroup/trajoptlib
Library for generating time-optimal trajectories for FRC robots. Used by the HelixNavigator path planning app.
https://github.com/sleipnirgroup/trajoptlib
cpp frc optimization robotics trajectory-optimization
Last synced: 4 months ago
JSON representation
Library for generating time-optimal trajectories for FRC robots. Used by the HelixNavigator path planning app.
- Host: GitHub
- URL: https://github.com/sleipnirgroup/trajoptlib
- Owner: SleipnirGroup
- License: bsd-3-clause
- Archived: true
- Created: 2022-06-27T00:39:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T03:33:45.000Z (6 months ago)
- Last Synced: 2024-09-26T13:43:24.504Z (4 months ago)
- Topics: cpp, frc, optimization, robotics, trajectory-optimization
- Language: C++
- Homepage:
- Size: 1.27 MB
- Stars: 16
- Watchers: 3
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
TrajoptLib has moved into the [Choreo](https://github.com/SleipnirGroup/Choreo/) repo.
# TrajoptLib
![Build](https://github.com/SleipnirGroup/TrajoptLib/actions/workflows/build.yml/badge.svg)
[![C++ Documentation](https://img.shields.io/badge/documentation-C%2B%2B-blue?label=Documentation)](https://sleipnirgroup.github.io/TrajoptLib/)
[![Discord](https://img.shields.io/discord/975739302933856277?color=%23738ADB&label=Join%20our%20Discord&logo=discord&logoColor=white)](https://discord.gg/ad2EEZZwsS)This library is used to generate time-optimal trajectories for FRC robots.
Trajectory optimization works by mathematically formulating the problem of travelling along a given path with the minimum possible time. The physical constraints of motor power capacity are applied along with waypoint constraints, which force the robot to begin and end a segment of the trajectory with a certain state. A mathematical solver must vary the position of the robot at each discrete timestamp to minimize total time.
## Features
* Currently only supports swerve drives with arbitray module configurations
* Position and velocity constraints at each waypoint
* Circle and polygon obstacle avoidance
* Custom physical constraints of robot
* Custom bumper shape## Build
### Dependencies
* C++23 compiler
* On Windows, install [Visual Studio Community 2022](https://visualstudio.microsoft.com/vs/community/) and select the C++ programming language during installation
* On Linux, install GCC 14 or greater via `sudo apt install g++`
* On macOS 14 or greater, install the Xcode command-line build tools via `xcode-select --install`. Xcode 15.3 or greater is required.
* [CMake](https://cmake.org/download/) 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](https://www.rust-lang.org/) compiler
* [Sleipnir](https://github.com/SleipnirGroup/Sleipnir) (optional backend)
* [Catch2](https://github.com/catchorg/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](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022). On Linux or macOS, open a Bash shell.
```bash
# Clone the repository
git clone [email protected]:SleipnirGroup/TrajoptLib
cd TrajoptLib# Configure
cmake -B build -S .# Build
cmake --build build# Test
ctest --test-dir build --output-on-failure# Install
cmake --install build --prefix pkgdir
```The 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](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022). On Linux or macOS, open a Bash shell.
```bash
# Clone the repository
git clone [email protected]:SleipnirGroup/TrajoptLib
cd TrajoptLibcargo build
```