(self, name='walker', marker_rgba=None, camera_control=False,
             initializer=None, add_ears=False, camera_height=None)
Build a JumpingBallWithHead.

    Args:
      name: name of the walker.
      marker_rgba: RGBA value set to walker.marker_geoms to distinguish between
        walkers (in multi-agent setting).
      camera_control: If `True`, the walker exposes two additional actuated
        degrees of freedom to control the egocentric camera height and tilt.
      initializer: (Optional) A `WalkerInitializer` object.
      add_ears: a boolean. Same as the nose above but the red/blue balls are
        placed to the left/right of the agent. Better for egocentric vision.
      camera_height: A float specifying the height of the camera, or `None` if
        the camera height should be left as specified in the XML model.
Build a JumpingBallWithHead.
Build a JumpingBallWithHead .
def _build(self, name='walker', marker_rgba=None, camera_control=False,
             initializer=None, add_ears=False, camera_height=None):
    """Build a JumpingBallWithHead.

    Args:
      name: name of the walker.
      marker_rgba: RGBA value set to walker.marker_geoms to distinguish between
        walkers (in multi-agent setting).
      camera_control: If `True`, the walker exposes two additional actuated
        degrees of freedom to control the egocentric camera height and tilt.
      initializer: (Optional) A `WalkerInitializer` object.
      add_ears: a boolean. Same as the nose above but the red/blue balls are
        placed to the left/right of the agent. Better for egocentric vision.
      camera_height: A float specifying the height of the camera, or `None` if
        the camera height should be left as specified in the XML model.
    """
    super()._build(initializer=initializer)
    self._mjcf_root = self._mjcf_root = mjcf.from_path(self._xml_path)

    if name:
      self._mjcf_root.model = name

    if camera_height is not None:
      self._mjcf_root.find('body', 'egocentric_camera').pos[2] = camera_height

    if add_ears:
      # Large ears
      head = self._mjcf_root.find('body', 'head_body')
      head.add('site', type='sphere', size=(.26,),
               pos=(.22, 0, 0),
               rgba=(.7, 0, 0, 1))
      head.add('site', type='sphere', size=(.26,),
               pos=(-.22, 0, 0),
               rgba=(0, 0, .7, 1))
    # Set corresponding marker color if specified.
    if marker_rgba is not None:
      for geom in self.marker_geoms:
        geom.set_attributes(rgba=marker_rgba)

    self._root_joints = None
    self._camera_control = camera_control
    if not camera_control:
      for name in ('camera_height', 'camera_tilt'):
        self._mjcf_root.find('actuator', name).remove()
        self._mjcf_root.find('joint', name).remove()
def _build ( self , name = 'walker' , marker_rgba = None , camera_control = False , initializer = None , add_ears = False , camera_height = None ) : super ( ) . _build ( initializer = initializer ) self . _mjcf_root = self . _mjcf_root = mjcf . from_path ( self . _xml_path ) if name : self . _mjcf_root . model = name if camera_height is not None : self . _mjcf_root . find ( 'body' , 'egocentric_camera' ) . pos [ 2 ] = camera_height if add_ears : # Large ears head = self . _mjcf_root . find ( 'body' , 'head_body' ) head . add ( 'site' , type = 'sphere' , size = ( .26 , ) , pos = ( .22 , 0 , 0 ) , rgba = ( .7 , 0 , 0 , 1 ) ) head . add ( 'site' , type = 'sphere' , size = ( .26 , ) , pos = ( - .22 , 0 , 0 ) , rgba = ( 0 , 0 , .7 , 1 ) ) # Set corresponding marker color if specified. if marker_rgba is not None : for geom in self . marker_geoms : geom . set_attributes ( rgba = marker_rgba ) self . _root_joints = None self . _camera_control = camera_control if not camera_control : for name in ( 'camera_height' , 'camera_tilt' ) : self . _mjcf_root . find ( 'actuator' , name ) . remove ( ) self . _mjcf_root . find ( 'joint' , name ) . remove ( )