(obs_settings, prop_name)
return task
Configure and instantiate a Lift task.

  Args:
    obs_settings: `observations.ObservationSettings` instance.
    prop_name: The name of the prop to be lifted. Must be either 'duplo' or
      'box'.

  Returns:
    An instance of `lift.Lift`.

  Raises:
    ValueError: If `prop_name` is neither 'duplo' nor 'box'.
Configure and instantiate a Lift task.
Configure and instantiate a Lift task .
def _lift(obs_settings, prop_name):
  """Configure and instantiate a Lift task.

  Args:
    obs_settings: `observations.ObservationSettings` instance.
    prop_name: The name of the prop to be lifted. Must be either 'duplo' or
      'box'.

  Returns:
    An instance of `lift.Lift`.

  Raises:
    ValueError: If `prop_name` is neither 'duplo' nor 'box'.
  """
  arena = arenas.Standard()
  arm = robots.make_arm(obs_settings=obs_settings)
  hand = robots.make_hand(obs_settings=obs_settings)

  if prop_name == 'duplo':
    workspace = _DUPLO_WORKSPACE
    prop = _DuploWithVertexSites(
        observable_options=observations.make_options(
            obs_settings, observations.FREEPROP_OBSERVABLES))
  elif prop_name == 'box':
    workspace = _BOX_WORKSPACE
    # NB: The box is intentionally too large to pick up with a pinch grip.
    prop = _BoxWithVertexSites(
        size=[_BOX_SIZE] * 3,
        observable_options=observations.make_options(
            obs_settings, observations.FREEPROP_OBSERVABLES))
    prop.geom.mass = _BOX_MASS
  else:
    raise ValueError('`prop_name` must be either \'duplo\' or \'box\'.')
  task = Lift(arena=arena, arm=arm, hand=hand, prop=prop, workspace=workspace,
              obs_settings=obs_settings,
              control_timestep=constants.CONTROL_TIMESTEP)
  return task
def _lift ( obs_settings , prop_name ) : arena = arenas . Standard ( ) arm = robots . make_arm ( obs_settings = obs_settings ) hand = robots . make_hand ( obs_settings = obs_settings ) if prop_name == 'duplo' : workspace = _DUPLO_WORKSPACE prop = _DuploWithVertexSites ( observable_options = observations . make_options ( obs_settings , observations . FREEPROP_OBSERVABLES ) ) elif prop_name == 'box' : workspace = _BOX_WORKSPACE # NB: The box is intentionally too large to pick up with a pinch grip. prop = _BoxWithVertexSites ( size = [ _BOX_SIZE ] * 3 , observable_options = observations . make_options ( obs_settings , observations . FREEPROP_OBSERVABLES ) ) prop . geom . mass = _BOX_MASS else : raise ValueError ( '`prop_name` must be either \'duplo\' or \'box\'.' ) task = Lift ( arena = arena , arm = arm , hand = hand , prop = prop , workspace = workspace , obs_settings = obs_settings , control_timestep = constants . CONTROL_TIMESTEP ) return task