(obs_settings, cradle_prop_name)
return task
Configure and instantiate a Place task.

  Args:
    obs_settings: `observations.ObservationSettings` instance.
    cradle_prop_name: The name of the prop onto which the Duplo brick must be
      placed. Must be either 'duplo' or 'cradle'.

  Returns:
    An instance of `Place`.

  Raises:
    ValueError: If `prop_name` is neither 'duplo' nor 'cradle'.
Configure and instantiate a Place task.
Configure and instantiate a Place task .
def _place(obs_settings, cradle_prop_name):
  """Configure and instantiate a Place task.

  Args:
    obs_settings: `observations.ObservationSettings` instance.
    cradle_prop_name: The name of the prop onto which the Duplo brick must be
      placed. Must be either 'duplo' or 'cradle'.

  Returns:
    An instance of `Place`.

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

  prop = props.Duplo(
      observable_options=observations.make_options(
          obs_settings, observations.FREEPROP_OBSERVABLES))
  if cradle_prop_name == 'duplo':
    cradle = props.Duplo()
  elif cradle_prop_name == 'cradle':
    cradle = SphereCradle()
  else:
    raise ValueError(
        '`cradle_prop_name` must be either \'duplo\' or \'cradle\'.')

  task = Place(arena=arena, arm=arm, hand=hand, prop=prop,
               obs_settings=obs_settings,
               workspace=_WORKSPACE,
               control_timestep=constants.CONTROL_TIMESTEP,
               cradle=cradle)
  return task
def _place ( obs_settings , cradle_prop_name ) : arena = arenas . Standard ( ) arm = robots . make_arm ( obs_settings = obs_settings ) hand = robots . make_hand ( obs_settings = obs_settings ) prop = props . Duplo ( observable_options = observations . make_options ( obs_settings , observations . FREEPROP_OBSERVABLES ) ) if cradle_prop_name == 'duplo' : cradle = props . Duplo ( ) elif cradle_prop_name == 'cradle' : cradle = SphereCradle ( ) else : raise ValueError ( '`cradle_prop_name` must be either \'duplo\' or \'cradle\'.' ) task = Place ( arena = arena , arm = arm , hand = hand , prop = prop , obs_settings = obs_settings , workspace = _WORKSPACE , control_timestep = constants . CONTROL_TIMESTEP , cradle = cradle ) return task