# OptimTraj - Trajectory Optimization for Matlab
[![DOI](https://zenodo.org/badge/40544279.svg)](https://zenodo.org/badge/latestdoi/40544279)
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:
- [Cart-pole swing-up](https://youtu.be/kAlhKJlu7O8): Find the force profile to apply to the cart to swing-up the pendulum that freely hanges from it.
- Compute the gait (joint angles, rates, and torques) for a walking robot that minimizes the energy used while walking.
- Find a minimum-thrust orbit transfer trajectory for a satellite.
#### 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
- continuous dynamics
- boundary constraints
- path constraints
- integral cost function
- boundary cost function
All functions in the problem description can be non-linear, but they must be smooth (C2 continuous).
## Features:
- __Easy to install -__ no dependencies outside of Matlab (for base functionality)
- __Lots of examples -__ look at the `demo/` directory to see for yourself!
- __Readable source code -__ easy to debug your code and figure out how the software works
- __Analytic gradients -__ most methods support analytic gradients
- __Rapidly switch methods -__ choose from a variety of methods:
- direct collocation
- trapezoid
- Hermite-Simpson (seperated)
- direct multiple shooting
- 4th-order Runge-Kutta
- global (pseudospectral) collocation
- Chebyshev (Lobatto) -- (requires [chebfun](http://www.chebfun.org/))
## Installation:
1. Clone or download the repository
2. Add the top level folder to your Matlab path
3. (Optional) Clone or download [chebfun](http://www.chebfun.org/) (needed for global collocation)
4. Done!
## Usage:
- Call the function `optimTraj` from inside matlab.
- `optimTraj` takes a single argument: a struct that describes your trajectory optimization problem.
- `optimTraj` returns a struct that describes the solution. It contains a full description of the problem, the transcription method that was used, and the solution (both as a vector of points and a function handle for interpolation).
- For more details, type `help optimTraj` at the command line, or check out some of the examples in the `demo/` directory.
## 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](https://epubs.siam.org/doi/10.1137/16M1062569) 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](http://www.matthewpeterkelly.com/tutorials/trajectoryOptimization/index.html) for trajectory optimization.
## Citing OptimTraj
The best way to cite OptimTraj is using the DOI assigned the the library source code:
[![DOI](https://zenodo.org/badge/40544279.svg)](https://zenodo.org/badge/latestdoi/40544279)
```bibtex
@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](https://epubs.siam.org/doi/10.1137/16M1062569) that accompanies OptimTraj:
```bibtex
@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:
- Create additional demo problems
- Identify holes in the documentation
- Report bugs
- Implement new methods or features
- Look through the open issues
## Contributions:
- [__Will Wehner__](https://github.com/wwehner) implemented analytic gradients in the 4th-order Runge-Kutta method.
- [__Conrad McGreal__](https://github.com/cjmcgreal) contributed the minimum-time 3D quadrotor example.
没有合适的资源?快使用搜索试试~ 我知道了~
A trajectory optimization library for Matlab.zip
共215个文件
m:178个
md:14个
tex:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 55 浏览量
2023-07-16
19:28:53
上传
评论
收藏 956KB ZIP 举报
温馨提示
A trajectory optimization library for Matlab
资源推荐
资源详情
资源评论
收起资源包目录
A trajectory optimization library for Matlab.zip (215个子文件)
TrajectoryOptimization.bib 120KB
biblio.bib 788B
CITATION.cff 369B
ieeeconf.cls 197KB
.DS_Store 6KB
.DS_Store 6KB
.gitignore 348B
rungeKutta.m 39KB
Derive_Equations.m 27KB
Derive_Equations.m 22KB
multiCheb.m 21KB
directCollocation.m 17KB
autoGen_cst_heelStrike.m 12KB
autoGen_cst_heelStrike.m 12KB
dirColGrad.m 11KB
hermiteSimpson.m 11KB
autoGen_dynSs.m 11KB
autoGen_dynSs.m 11KB
chebyshev.m 10KB
MAIN.m 10KB
RESULTS.m 10KB
MAIN.m 9KB
getDefaultOptions.m 8KB
MAIN.m 8KB
trapezoid.m 8KB
optimTraj.m 7KB
MAIN.m 7KB
MAIN.m 6KB
gpopsWrapper.m 6KB
RESULTS_makePlots.m 5KB
MAIN.m 5KB
MAIN_minTime.m 5KB
MAIN_minJerkTraj.m 5KB
MAIN_minAccelTraj.m 5KB
Derive_simpleWalker.m 5KB
inputValidation.m 4KB
MAIN_minForce.m 4KB
MAIN.m 4KB
MAIN.m 4KB
animate.m 4KB
MAIN.m 4KB
dynBodyFrame.m 4KB
MAIN_minForceTraj.m 4KB
TEST_dynQuadRotor3d.m 3KB
controller.m 3KB
MAIN_minTimeTraj.m 3KB
MAIN_minThrottleTraj.m 3KB
Derive_EoM.m 3KB
MAIN.m 3KB
MAIN.m 3KB
cst_heelStrike.m 3KB
cst_heelStrike.m 3KB
pathConstraint.m 2KB
definePropulsionModel.m 2KB
MAIN_smoothWork.m 2KB
dynQuadRotor3d.m 2KB
MAIN_cstWork.m 2KB
dynamics.m 2KB
MAIN.m 2KB
Derive_cartPole.m 2KB
rombergQuadrature.m 2KB
showPropulsionModel.m 2KB
drawCartPoleTraj.m 2KB
drawRobotStopAction.m 2KB
drawRobotStopAction.m 2KB
TEST_dynBodyFrame.m 2KB
Derive_acrobot.m 2KB
plotQuadRotor3d.m 2KB
drawCartPoleAnim.m 2KB
dynamics.m 2KB
autoGen_contactForce.m 2KB
autoGen_contactForce.m 2KB
drawRobot.m 2KB
drawRobot.m 2KB
MAIN_forceSquared.m 2KB
plotPropLoc.m 2KB
MAIN_simulate.m 1KB
cst_footVel.m 1KB
cst_footVel.m 1KB
MAIN.m 1KB
autoGen_energy.m 1KB
autoGen_energy.m 1KB
rocketDynamics.m 1KB
autoGen_dynamics.m 1KB
obj_costOfTransport.m 1KB
loadPlant_QuadRotor3d.m 1KB
TEST_openLoopDynamics.m 1KB
autoGen_heelStrike.m 1KB
autoGen_obj_costOfTransport.m 1KB
cartPoleKinematics.m 1KB
acrobotDynamics.m 1KB
collectConstraints.m 1KB
getPhysicalParameters.m 1KB
getPhysicalParameters.m 1KB
autoGen_acrobotDynamics.m 1KB
autoGen_cst_footVel.m 1KB
TEST_definePropulsionModel.m 1KB
stepConstraint.m 1020B
stepConstraint.m 1020B
TEST_dynamics.m 1020B
共 215 条
- 1
- 2
- 3
资源评论
AbelZ_01
- 粉丝: 894
- 资源: 5441
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功