Skip to content

Commit 20f726e

Browse files
author
Zac Manchester
committed
fixed quickstart
1 parent 4a26dc5 commit 20f726e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

examples/quickstart.jl

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
using TrajectoryOptimization
2+
using Altro
3+
using RobotDynamics
24
using StaticArrays
35
using LinearAlgebra
46
const TO = TrajectoryOptimization
7+
const RD = RobotDynamics
58

6-
struct DoubleIntegrator{T} <: AbstractModel
9+
struct DoubleIntegrator{T} <: TO.AbstractModel
710
mass::T
811
end
912

10-
function TO.dynamics(model::DoubleIntegrator, x, u)
13+
function RD.dynamics(model::DoubleIntegrator, x, u)
1114
SA[x[2], u[1] / model.mass]
1215
end
1316

@@ -28,7 +31,7 @@ R = Diagonal(@SVector ones(m))
2831
obj = LQRObjective(Q, R, N*Q, xf, N)
2932

3033
# Constraints
31-
cons = TO.ConstraintSet(n,m,N)
34+
cons = ConstraintList(n,m,N)
3235
add_constraint!(cons, GoalConstraint(xf), N:N)
3336
add_constraint!(cons, BoundConstraint(n,m, u_min=-10, u_max=10), 1:N-1)
3437

0 commit comments

Comments
 (0)