Closed JTaets closed 3 years ago
I was able to fix this, by removing some of the DEFAULT_Q in the code and passing the correct integrator(prob)
More specifically:
in ilqr.jl
: iLQRSolver( prob::Problem{QUAD,T}, opts::SolverOptions=SolverOptions(), stats::SolverStats=SolverStats(parent=solvername(iLQRSolver)); kwarg_opts... ) where {QUAD,T}
.
Change cache = FiniteDiff.JacobianCache(prob.model)
to cache = FiniteDiff.JacobianCache(prob.model, sparsity = RobotDynamics.detect_sparsity(QUAD, prob.model))
Similarly in constraints.jl
: DynamicsConstraint{Q}(model::L, N) where {Q,L}
.
Change cache = FiniteDiff.JacobianCache(model)
to cache = FiniteDiff.JacobianCache(model, sparsity = RobotDynamics.detect_sparsity(Q, model))
Hi, thanks for making his package available!
When trying to use the solvers with discrete dynamics, an error is thrown. Complaining it doesn't have
RobotDynamics.discrete_dynamics(model::Cartpole,x,u,t)
in the linealtro = ALTROSolver(prob, opts)
.Kind regards.