(self, current_time: float)
Called at each control step.

    Args:
      current_time: The wall time in seconds.
Called at each control step.
Called at each control step .
def update(self, current_time: float) -> None:
    """Called at each control step.

    Args:
      current_time: The wall time in seconds.
    """
    del current_time
    new_leg_state = self._gait_generator.desired_leg_state

    # Detects phase switch for each leg so we can remember the feet position at
    # the beginning of the swing phase.
    for leg_id, state in enumerate(new_leg_state):
      if (state == gait_generator_lib.LegState.SWING
          and state != self._last_leg_state[leg_id]):
        self._phase_switch_foot_local_position[leg_id] = (
            self._robot.GetFootPositionsInBaseFrame()[leg_id])

    self._last_leg_state = copy.deepcopy(new_leg_state)
def update ( self , current_time : float ) -> None : del current_time new_leg_state = self . _gait_generator . desired_leg_state # Detects phase switch for each leg so we can remember the feet position at # the beginning of the swing phase. for leg_id , state in enumerate ( new_leg_state ) : if ( state == gait_generator_lib . LegState . SWING and state != self . _last_leg_state [ leg_id ] ) : self . _phase_switch_foot_local_position [ leg_id ] = ( self . _robot . GetFootPositionsInBaseFrame ( ) [ leg_id ] ) self . _last_leg_state = copy . deepcopy ( new_leg_state )