(
      self, arena, arm, hand, prop, obs_settings, workspace, control_timestep)
Initializes a new `Lift` task.

    Args:
      arena: `composer.Entity` instance.
      arm: `robot_base.RobotArm` instance.
      hand: `robot_base.RobotHand` instance.
      prop: `composer.Entity` instance.
      obs_settings: `observations.ObservationSettings` instance.
      workspace: `_LiftWorkspace` specifying the placement of the prop and TCP.
      control_timestep: Float specifying the control timestep in seconds.
Initializes a new `Lift` task.
Initializes a new Lift task .
def __init__(
      self, arena, arm, hand, prop, obs_settings, workspace, control_timestep):
    """Initializes a new `Lift` task.

    Args:
      arena: `composer.Entity` instance.
      arm: `robot_base.RobotArm` instance.
      hand: `robot_base.RobotHand` instance.
      prop: `composer.Entity` instance.
      obs_settings: `observations.ObservationSettings` instance.
      workspace: `_LiftWorkspace` specifying the placement of the prop and TCP.
      control_timestep: Float specifying the control timestep in seconds.
    """
    self._arena = arena
    self._arm = arm
    self._hand = hand
    self._arm.attach(self._hand)
    self._arena.attach_offset(self._arm, offset=workspace.arm_offset)
    self.control_timestep = control_timestep

    # Add custom camera observable.
    self._task_observables = cameras.add_camera_observables(
        arena, obs_settings, cameras.FRONT_CLOSE)

    self._tcp_initializer = initializers.ToolCenterPointInitializer(
        self._hand, self._arm,
        position=distributions.Uniform(*workspace.tcp_bbox),
        quaternion=workspaces.DOWN_QUATERNION)

    self._prop = prop
    self._arena.add_free_entity(prop)
    self._prop_placer = initializers.PropPlacer(
        props=[prop],
        position=distributions.Uniform(*workspace.prop_bbox),
        quaternion=workspaces.uniform_z_rotation,
        ignore_collisions=True,
        settle_physics=True)

    # Add sites for visualizing bounding boxes and target height.
    self._target_height_site = workspaces.add_bbox_site(
        body=self.root_entity.mjcf_model.worldbody,
        lower=(-1, -1, 0), upper=(1, 1, 0),
        rgba=constants.RED, name='target_height')
    workspaces.add_bbox_site(
        body=self.root_entity.mjcf_model.worldbody,
        lower=workspace.tcp_bbox.lower, upper=workspace.tcp_bbox.upper,
        rgba=constants.GREEN, name='tcp_spawn_area')
    workspaces.add_bbox_site(
        body=self.root_entity.mjcf_model.worldbody,
        lower=workspace.prop_bbox.lower, upper=workspace.prop_bbox.upper,
        rgba=constants.BLUE, name='prop_spawn_area')
def __init__ ( self , arena , arm , hand , prop , obs_settings , workspace , control_timestep ) : self . _arena = arena self . _arm = arm self . _hand = hand self . _arm . attach ( self . _hand ) self . _arena . attach_offset ( self . _arm , offset = workspace . arm_offset ) self . control_timestep = control_timestep # Add custom camera observable. self . _task_observables = cameras . add_camera_observables ( arena , obs_settings , cameras . FRONT_CLOSE ) self . _tcp_initializer = initializers . ToolCenterPointInitializer ( self . _hand , self . _arm , position = distributions . Uniform ( * workspace . tcp_bbox ) , quaternion = workspaces . DOWN_QUATERNION ) self . _prop = prop self . _arena . add_free_entity ( prop ) self . _prop_placer = initializers . PropPlacer ( props = [ prop ] , position = distributions . Uniform ( * workspace . prop_bbox ) , quaternion = workspaces . uniform_z_rotation , ignore_collisions = True , settle_physics = True ) # Add sites for visualizing bounding boxes and target height. self . _target_height_site = workspaces . add_bbox_site ( body = self . root_entity . mjcf_model . worldbody , lower = ( - 1 , - 1 , 0 ) , upper = ( 1 , 1 , 0 ) , rgba = constants . RED , name = 'target_height' ) workspaces . add_bbox_site ( body = self . root_entity . mjcf_model . worldbody , lower = workspace . tcp_bbox . lower , upper = workspace . tcp_bbox . upper , rgba = constants . GREEN , name = 'tcp_spawn_area' ) workspaces . add_bbox_site ( body = self . root_entity . mjcf_model . worldbody , lower = workspace . prop_bbox . lower , upper = workspace . prop_bbox . upper , rgba = constants . BLUE , name = 'prop_spawn_area' )