You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-39Lines changed: 47 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -16,59 +16,67 @@ A library of solvers for trajectory optimization problems written in Julia. Curr
16
16
Direct Collocation (DIRCOL)
17
17
* Interfaces to Nonlinear Programming solvers (e.g., [Ipopt](https://github.com/coin-or/Ipopt), [SNOPT](https://ccom.ucsd.edu/~optimizers/solvers/snopt/)) via [MathOptInterface](https://github.com/JuliaOpt/MathOptInterface.jl)
18
18
19
-
All methods utilize Julia's extensive autodifferentiation capabilities via [ForwardDiff.jl](http://www.juliadiff.org/ForwardDiff.jl/) so that the user does not need to specify derivatives of dynamics, cost, or constraint functions. Dynamics can be computed directly from a URDF file via [RigidBodyDynamics.jl](https://github.com/JuliaRobotics/RigidBodyDynamics.jl).
19
+
All methods utilize Julia's extensive autodifferentiation capabilities via [ForwardDiff.jl](http://www.juliadiff.org/ForwardDiff.jl/) so that the user does not need to specify derivatives of dynamics, cost, or constraint functions.
20
20
21
21
## Installation
22
22
To install TrajectoryOptimization.jl, run the following from the Julia REPL:
23
23
```julia
24
24
Pkg.add("TrajectoryOptimization")
25
25
```
26
26
27
+
# What's New
28
+
`TrajectoryOptimization.jl` underwent significant changes between versions `v0.1` and `v0.2`. The new code is significantly faster (up to 100x faster). The core part of the ALTRO solver (everything except the projected newton phase) is completely allocation-free once the solver has been initialized. Most of the API has changed significantly. See the documentation for more information on the new API.
29
+
27
30
## Quick Start
28
-
To run a simple example of a constrained 1D block move:
31
+
To run a simple example of a constrained 1D block move (see script in `/examples/quickstart.jl`):
29
32
```julia
30
-
using TrajectoryOptimization, LinearAlgebra
33
+
using TrajectoryOptimization
34
+
using StaticArrays
35
+
using LinearAlgebra
36
+
const TO = TrajectoryOptimization
31
37
32
-
functiondynamics!(ẋ,x,u) # inplace dynamics
33
-
ẋ[1] = x[2]
34
-
ẋ[2] = u[1]
38
+
struct DoubleIntegrator{T} <:AbstractModel
39
+
mass::T
35
40
end
36
41
37
-
n =2# number of states
38
-
m =1# number of controls
39
-
model =Model(dynamics!,n,m) # create model
40
-
model_d =rk3(model) # create discrete model w/ rk3 integration
41
-
42
-
x0 = [0.; 0.] # initial state
43
-
xf = [1.; 0.] # goal state
44
-
45
-
N =21# number of knot points
46
-
dt =0.1# time step
47
-
48
-
U0 = [0.01*rand(m) for k =1:N-1]; # initial control trajectory
49
-
50
-
Q =1.0*Diagonal(I,n)
51
-
Qf =1.0*Diagonal(I,n)
52
-
R =1.0e-1*Diagonal(I,m)
53
-
obj =LQRObjective(Q,R,Qf,xf,N) # objective
54
-
55
-
bnd =BoundConstraint(n,m,u_max=1.5, u_min=-1.5) # control limits
56
-
goal =goal_constraint(xf) # terminal constraint
57
-
58
-
constraints =Constraints(N) # define constraints at each time step
59
-
for k =1:N-1
60
-
constraints[k] += bnd
42
+
function TO.dynamics(model::DoubleIntegrator, x, u)
Notebooks with more detailed examples can be found [here](https://github.com/RoboticExplorationLab/TrajectoryOptimization.jl/tree/master/examples), including all the examples from our [IROS 2019 paper](https://github.com/RoboticExplorationLab/TrajectoryOptimization.jl/tree/master/examples/IROS_2019).
72
-
73
-
## Documentation
74
-
Detailed documentation for getting started with the package can be found [here](https://roboticexplorationlab.github.io/TrajectoryOptimization.jl/dev/).
82
+
Notebooks with more detailed examples can be found [here](https://github.com/RoboticExplorationLab/TrajectoryOptimization.jl/tree/master/examples), including all the examples from our [IROS 2019 paper](https://rexlab.stanford.edu/papers/altro-iros.pdf).
0 commit comments