MatthewPeterKelly / OptimTraj

A trajectory optimization library for Matlab
MIT License
623 stars 210 forks source link

OptimTraj - Trajectory Optimization for Matlab

DOI

OptimTraj is a matlab library designed for solving continuous-time single-phase trajectory optimization problems. I developed it while working on my PhD at Cornell, studying non-linear controller design for walking robots.

What sort of problems does OptimTraj solve?

Examples:

Details:

OptimTraj finds the optimal trajectory for a dynamical system. This trajectory is a sequence of controls (expressed as a function) that moves the dynamical system between two points in state space. The trajectory will minimize some cost function, which is typically an integral along the trajectory. The trajectory will also satisfy a set user-defined constraints.

OptimTraj solves problems with

All functions in the problem description can be non-linear, but they must be smooth (C2 continuous).

Features:

Installation:

  1. Clone or download the repository
  2. Add the top level folder to your Matlab path
  3. (Optional) Clone or download chebfun (needed for global collocation)
  4. Done!

Usage:

Documentation:

The best way to learn OptimTraj is by working through a few of the examples in the demo/ directory. There is also a .pdf user guide that can be found in the /docs directory.

For more background on trajectory optimization in general, I wrote a tutorial paper that includes derivations and references for most methods implemented here, along with a variety of practical suggestions and debugging tips. Finally, I have a tutorial webpage for trajectory optimization.

Citing OptimTraj

The best way to cite OptimTraj is using the DOI assigned the the library source code:

DOI

@software{Kelly_OptimTraj_Trajectory_Optimization_2022,
  author = {Kelly, Matthew Peter},
  doi = {10.5281/zenodo.7430524},
  month = {12},
  title = {{OptimTraj: Trajectory Optimization for Matlab}},
  url = {https://github.com/MatthewPeterKelly/OptimTraj},
  version = {1.7},
  year = {2022}
}

Alternatively, you can cite the tutorial paper that accompanies OptimTraj:

@article{kelly2017introduction,
  title={An Introduction to Trajectory Optimization: How to do your own Direct Collocation},
  author={Kelly, Matthew},
  journal={SIAM Review},
  volume={59},
  number={4},
  pages={849--904},
  year={2017},
  publisher={SIAM}
}

Contribute:

Contributions are welcome! Feel free to reach out if you're planning a bigger submission, or just go ahead and make a pull request for smaller contributions.

If you are interested in contributing, here are a few possible things to do:

Contributions: