jrl-umi3218/lipm_walking_controller

Automatically choosing starting foot

chrisyeew opened this issue · 1 comments

Not exactly an issue, but I wanted to start a discussion on best practice for how to automatically choose the starting foot for a custom walking maneuver using the PlanInterpolator.

I originally implemented a very simple line that does this: startWithRightFootstep_ = (targetPose_.y <= 0); at the beginning of void PlanInterpolator::runWalking_(), which seems to work well in simple test cases, but in case where the "Initial Tangent" pushes the trajectory to the other side, then the starting foot is the wrong one (see picture).

image

Not sure what would be a good way to implement automatic lead foot selection.

I think the first (right) of these two examples is best. The second one has a left swing phase where the foot rotates 90 degrees. Down the line means the pelvis will turn around 45 degrees (pelvis orientation is the average of foot frame orientations in double support), and that's not good either.

A good heuristic to evaluate the quality of a footstep plan is the "amount" (average or maximum) of foot rotations per step. We use HOUBA curves because they tend to yield low guide path curvature (hence less per-step rotations), but it's a heuristic. Your example illustrates how choosing the lead foot can influence per-step rotations too. So how about calling runWalking_() once for each lead foot and selecting the best of both? 😉

Lastly, when your target is close in translation but turns a lot, you can also reduce the step width.