(self, action, substep_count)
return proc_action
If enabled, interpolates between the current and previous actions.

    Args:
      action: current action.
      substep_count: the step count should be between [0, self.__action_repeat).

    Returns:
      If interpolation is enabled, returns interpolated action depending on
      the current action repeat substep.
If enabled, interpolates between the current and previous actions.
If enabled interpolates between the current and previous actions .
def ProcessAction(self, action, substep_count):
    """If enabled, interpolates between the current and previous actions.

    Args:
      action: current action.
      substep_count: the step count should be between [0, self.__action_repeat).

    Returns:
      If interpolation is enabled, returns interpolated action depending on
      the current action repeat substep.
    """
    if self._enable_action_interpolation and self._last_action is not None:
      lerp = float(substep_count + 1) / self._action_repeat
      proc_action = self._last_action + lerp * (action - self._last_action)
    else:
      proc_action = action

    return proc_action
def ProcessAction ( self , action , substep_count ) : if self . _enable_action_interpolation and self . _last_action is not None : lerp = float ( substep_count + 1 ) / self . _action_repeat proc_action = self . _last_action + lerp * ( action - self . _last_action ) else : proc_action = action return proc_action