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
You only need to update the follow code where you can easily locate it:
% dynamics second derivatives
N_J = size(J);
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?
Better printing and diagnostics, added example of user callback.
Fixed bug in calculation of reduction ratio.
Inspired: Belief Space Motion Planning using iLQG
Create scripts with code, output, and formatted text in a single executable document.