Skip to main content
. 2023 Mar 10;8(1):114. doi: 10.3390/biomimetics8010114
Algorithm 1 Iterative computation for target footholds
  • 1:

    Commanded translational speed: c˙cmdx,y;

  • 2:

    Using (5) and (6) to plan the vertical trajectory: cj+1z,c¨j+1z;

  • 3:

    Given nominal ZMP trajectory of next step: pnom,j+1x,y;

  • 4:

    With (13) and capturability constraints of CoM velocity (c˙j+1x,y(t0)=c˙jx,y(tf),c˙j+1x,y(tf)=c˙cmdx,y), get temporary horizontal CoM trajectory: ctemp,j+1x,y;

  • 5:

    forix,ydo

  • 6:

       Δci=ctemp,j+1i(t0)cji(tf);

  • 7:

       if Δcitol then

  • 8:

         ptgt,j+1i=pnom,j+1i;ctgt,j+1i=ctemp,j+1i;

  • 9:

       else

  • 10:

         iter0;

  • 11:

         ptemp,j+1i=pnom,j+1i;

  • 12:

         while Δci>tol do

  • 13:

            ptemp,j+1i=ptemp,j+1iΔci;

  • 14:

            iteriter+1;

  • 15:

            Repeat Line 4 ctemp,j+1i;

  • 16:

            Δci=ctemp,j+1i(t0)cji(tf);

  • 17:

         end while

  • 18:

         ptgt,j+1i=ptemp,j+1i;ctgt,j+1i=ctemp,j+1i;

  • 19:

       end if

  • 20:

    end for