MCPcopy Create free account
hub / github.com/csiro-robotics/syropod_highlevel_controller / updateStepState

Method updateStepState

src/walk_controller.cpp:910–925  ·  view source on GitHub ↗

/ * Updates the Step state of this LegStepper according to the phase ***********************************************************************************************************************/

Source from the content-addressed store, hash-verified

908 * Updates the Step state of this LegStepper according to the phase
909***********************************************************************************************************************/
910void 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

Callers 1

updateWalkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected