Source code for loco_mujoco.utils.goals

from copy import deepcopy


[docs] class GoalDirectionVelocity: def __init__(self): self._direction = None self._velocity = None def __call__(self): return self.get_goal()
[docs] def get_goal(self): assert self._direction is not None assert self._velocity is not None return deepcopy(self._direction), deepcopy(self._velocity)
[docs] def set_goal(self, direction, velocity): self._direction = direction self._velocity = velocity
[docs] def get_direction(self): assert self._direction is not None return deepcopy(self._direction)
[docs] def get_velocity(self): assert self._velocity is not None return deepcopy(self._velocity)