Exemplo n.º 1
0
def cmu_humanoid_tracking(random_state=None):
    """Requires a CMU humanoid to run down a corridor obstructed by walls."""

    # Use a position-controlled CMU humanoid walker.
    walker_type = cmu_humanoid.CMUHumanoidPositionControlledV2020

    # Build an empty arena.
    arena = arenas.Floor()

    # Build a task that rewards the agent for tracking motion capture reference
    # data.
    task = tracking.MultiClipMocapTracking(
        walker=walker_type,
        arena=arena,
        ref_path=cmu_mocap_data.get_path_for_cmu_2020(),
        dataset='walk_tiny',
        ref_steps=(1, 2, 3, 4, 5),
        min_steps=10,
        reward_type='comic',
    )

    return composer.Environment(time_limit=30,
                                task=task,
                                random_state=random_state,
                                strip_singleton_obs_buffer_dim=True)
Exemplo n.º 2
0
  def setUp(self):
    super().setUp()

    self.walker = walkers.CMUHumanoidPositionControlled
    def _make_wrong_walker(name):
      return walkers.CMUHumanoidPositionControlled(
          include_face=False, model_version='2020', scale_default=True,
          name=name)
    self.wrong_walker = _make_wrong_walker
    self.arena = arenas.Floor()
    self.test_data = resources.GetResourceFilename(TEST_FILE_PATH)
Exemplo n.º 3
0
def mocap_playback_env(random_state=None):
    """Constructs mocap playback environment."""

    # Use a position-controlled CMU humanoid walker.
    walker_type = walkers.CMUHumanoidPositionControlledV2020

    # Build an empty arena.
    arena = arenas.Floor()

    # Build a task that rewards the agent for tracking motion capture reference
    # data.
    task = tracking.PlaybackTask(
        walker=walker_type,
        arena=arena,
        ref_path=cmu_mocap_data.get_path_for_cmu(version='2020'),
        dataset='run_jump_tiny',
    )

    return composer.Environment(time_limit=30,
                                task=task,
                                random_state=random_state,
                                strip_singleton_obs_buffer_dim=True)