/ * Updates the Step state of this LegStepper according to the phase ***********************************************************************************************************************/
| 908 | * Updates the Step state of this LegStepper according to the phase |
| 909 | ***********************************************************************************************************************/ |
| 910 | void LegStepper::updateStepState(void) |
| 911 | { |
| 912 | // Update step state from phase unless force stopped |
| 913 | if (step_state_ == FORCE_STOP) |
| 914 | { |
| 915 | return; |
| 916 | } |
| 917 | else if (phase_ >= walker_->getSwingStart() && phase_ < walker_->getSwingEnd()) |
| 918 | { |
| 919 | step_state_ = SWING; |
| 920 | } |
| 921 | else if (phase_ < walker_->getStanceEnd() || phase_ >= walker_->getStanceStart()) |
| 922 | { |
| 923 | step_state_ = STANCE; |
| 924 | } |
| 925 | } |
| 926 | |
| 927 | /*******************************************************************************************************************//** |
| 928 | * Updates the stride vector for this leg based on desired linear and angular velocity, with reference to the estimated |