MocoFrameDistanceConstraint
Posted: Wed Nov 15, 2023 3:52 am
Hi all,
I want to adjust the distance from the heel of one foot to the toe of the other while walking in the MOCO. My goal is to generate a trajectory by adjusting the step length. Can I use the MocoFrameDistanceConstraint() function to set the distance in the x direction? Because I considered it as follows and the MATLAB code gives an error.
Thank you.
distanceConstraint = MocoFrameDistanceConstraint();
distanceConstraint.setName('distance');
distanceConstraint.addFramePair(MocoFrameDistanceConstraintPair('/bodyset/toes_r', '/bodyset/heel_l', .15, .3));
distanceConstraint.addFramePair(MocoFrameDistanceConstraintPair('/bodyset/toes_l', '/bodyset/heel_r', .15, .3));
projectionVector = [1, 0, 0];
distanceConstraint.setProjectionVector(projectionVector);
problem.addPathConstraint(distanceConstraint);
Error:
Check for incorrect argument data type or missing argument in call to function 'setProjectionVector'.
distanceConstraint.setProjectionVector(projectionVector);
I want to adjust the distance from the heel of one foot to the toe of the other while walking in the MOCO. My goal is to generate a trajectory by adjusting the step length. Can I use the MocoFrameDistanceConstraint() function to set the distance in the x direction? Because I considered it as follows and the MATLAB code gives an error.
Thank you.
distanceConstraint = MocoFrameDistanceConstraint();
distanceConstraint.setName('distance');
distanceConstraint.addFramePair(MocoFrameDistanceConstraintPair('/bodyset/toes_r', '/bodyset/heel_l', .15, .3));
distanceConstraint.addFramePair(MocoFrameDistanceConstraintPair('/bodyset/toes_l', '/bodyset/heel_r', .15, .3));
projectionVector = [1, 0, 0];
distanceConstraint.setProjectionVector(projectionVector);
problem.addPathConstraint(distanceConstraint);
Error:
Check for incorrect argument data type or missing argument in call to function 'setProjectionVector'.
distanceConstraint.setProjectionVector(projectionVector);