File Exchange

image thumbnail

iLQG/DDP trajectory optimization

version (13.8 KB) by Yuval
Solve the deterministic finite-horizon optimal control problem with iLQG/DDP


Updated 14 Oct 2015

View License

Solve the deterministic finite-horizon optimal control problem with the iLQG (iterative Linear Quadratic Gaussian) or modified DDP (Differential Dynamic Programming) algorithm. Includes two demos, a linear control-constrained problem and a car-parking problem. For details see
Tassa, Mansard and Todorov, 'Control-Limited Differential Dynamic Programming', ICRA 2014

Comments and Ratings (8)

Aykut Onol

Yanran Ding

You only need to update the follow code where you can easily locate it:
% dynamics second derivatives
N_J = size(J);
if full_DDP
xu_Jcst = @(xu) finite_diff(xu_dyn, xu);
JJ = finite_diff(xu_Jcst, [x; u]);
if length(N_J) <= 2
JJ = reshape(JJ,[4 6 N_J(2)]);
JJ = reshape(JJ, [4 6 N_J(2) N_J(3)]);

I am not able to run the demo_car.m example with full_DDP = true;
Then I get an error on line 151 saying that reshaping needs to preserve size.
I've been trying to figure out what would fix the bug but no luck, anyone else?

Chen Yuying



Better printing and diagnostics, added example of user callback.

Fixed bug in calculation of reduction ratio.

minor tweaks

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: Belief Space Motion Planning using iLQG

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor