diff --git a/demos/demo_OC_DDP_humanoid01.m b/demos/demo_OC_DDP_humanoid01.m index 24ae72f4442c249f315f33229f791f8f39a49a7f..9f38315750df3422660c49091a904a0b52e72943 100644 --- a/demos/demo_OC_DDP_humanoid01.m +++ b/demos/demo_OC_DDP_humanoid01.m @@ -1,5 +1,6 @@ function demo_OC_DDP_humanoid01 % iLQR applied to a planar 5-link humanoid problem with constraints between joints. +% (see also demo_OC_DDP_CoM01.m) % % If this code is useful for your research, please cite the related publication: % @article{Lembono21, diff --git a/demos/demo_ergodicControl_2D01.m b/demos/demo_ergodicControl_2D01.m index 17c4342be2cddd1a28a9bbba99cdfaed3d3c0d29..4bbad6583b0402729ebfff8ed7a9462242557d29 100644 --- a/demos/demo_ergodicControl_2D01.m +++ b/demos/demo_ergodicControl_2D01.m @@ -42,7 +42,7 @@ nbVar = 2; %Dimension of datapoint nbStates = 2; %Number of Gaussians to represent the spatial distribution sp = (nbVar + 1) / 2; %Sobolev norm parameter dt = 1E-2; %Time step -xlim = [0; .5]; %Domain limit for each dimension (considered to be 1 for each dimension in this implementation) +xlim = [0; 1]; %Domain limit for each dimension (considered to be 1 for each dimension in this implementation) L = (xlim(2) - xlim(1)) * 2; %Size of [-xlim(2),xlim(2)] om = 2 * pi / L; %omega u_max = 1E1; %Maximum speed allowed @@ -58,9 +58,6 @@ Sigma(:,:,1) = [.3;.1]*[.3;.1]' .*5E-1 + eye(nbVar)*5E-3; %eye(nbVar).*1E-2; Mu(:,2) = [.6; .3]; Sigma(:,:,2) = [.1;.2]*[.1;.2]' .*3E-1 + eye(nbVar)*1E-2; -Mu = Mu * 0.5; -Sigma = Sigma * 0.5; - % Mu = rand(nbVar, nbStates); % Sigma = repmat(eye(nbVar)*1E-1, [1,1,nbStates]); @@ -74,8 +71,8 @@ rg = 0:nbFct-1; [KX(1,:,:), KX(2,:,:)] = ndgrid(rg, rg); Lambda = (KX(1,:).^2 + KX(2,:).^2 + 1)'.^-sp; %Weighting vector (Eq.(15)) -%Explicit description of phi_k by exploiting the Fourier transform properties of Gaussians (optimized version by exploiting symmetries) -%Enumerate symmetry operations for 2D signal ([-1,-1],[-1,1],[1,-1] and [1,1]), and removing redundant ones -> keeping ([-1,-1],[-1,1]) +%Explicit description of phi_k by exploiting the Fourier transform properties of Gaussians (optimized version by exploiting symmetries), +%by enumerating symmetry operations for 2D signal ([-1,-1],[-1,1],[1,-1] and [1,1]), and removing redundant ones -> keeping ([-1,-1],[-1,1]) op = hadamard(2^(nbVar-1)); op = op(1:nbVar,:); %Compute phi_k