(self,
             radius=0.6,
             height_above_ground=1,
             rgb1=(0, 0.4, 0),
             rgb2=(0, 0.7, 0),
             specific_collision_geom_ids=None,
             name='target')
Builds this target sphere.

    Args:
      radius: The radius (in meters) of this target sphere.
      height_above_ground: The height (in meters) of this target above ground.
      rgb1: A sequence of three floating point values between 0.0 and 1.0
        (inclusive) representing the color of the first element in the stripe
        pattern of the target.
      rgb2: A sequence of three floating point values between 0.0 and 1.0
        (inclusive) representing the color of the second element in the stripe
        pattern of the target.
      specific_collision_geom_ids: Only activate if collides with these geoms.
      name: The name of this entity.
Builds this target sphere.
Builds this target sphere .
def _build(self,
             radius=0.6,
             height_above_ground=1,
             rgb1=(0, 0.4, 0),
             rgb2=(0, 0.7, 0),
             specific_collision_geom_ids=None,
             name='target'):
    """Builds this target sphere.

    Args:
      radius: The radius (in meters) of this target sphere.
      height_above_ground: The height (in meters) of this target above ground.
      rgb1: A sequence of three floating point values between 0.0 and 1.0
        (inclusive) representing the color of the first element in the stripe
        pattern of the target.
      rgb2: A sequence of three floating point values between 0.0 and 1.0
        (inclusive) representing the color of the second element in the stripe
        pattern of the target.
      specific_collision_geom_ids: Only activate if collides with these geoms.
      name: The name of this entity.
    """
    self._mjcf_root = mjcf.RootElement(model=name)
    self._texture = self._mjcf_root.asset.add(
        'texture', name='target_sphere', type='cube',
        builtin='checker', rgb1=rgb1, rgb2=rgb2,
        width='100', height='100')
    self._material = self._mjcf_root.asset.add(
        'material', name='target_sphere', texture=self._texture)
    self._geom = self._mjcf_root.worldbody.add(
        'geom', type='sphere', name='geom', gap=2*radius,
        pos=[0, 0, height_above_ground], size=[radius], material=self._material)
    self._geom_id = -1
    self._activated = False
    self._specific_collision_geom_ids = specific_collision_geom_ids
def _build ( self , radius = 0.6 , height_above_ground = 1 , rgb1 = ( 0 , 0.4 , 0 ) , rgb2 = ( 0 , 0.7 , 0 ) , specific_collision_geom_ids = None , name = 'target' ) : self . _mjcf_root = mjcf . RootElement ( model = name ) self . _texture = self . _mjcf_root . asset . add ( 'texture' , name = 'target_sphere' , type = 'cube' , builtin = 'checker' , rgb1 = rgb1 , rgb2 = rgb2 , width = '100' , height = '100' ) self . _material = self . _mjcf_root . asset . add ( 'material' , name = 'target_sphere' , texture = self . _texture ) self . _geom = self . _mjcf_root . worldbody . add ( 'geom' , type = 'sphere' , name = 'geom' , gap = 2 * radius , pos = [ 0 , 0 , height_above_ground ] , size = [ radius ] , material = self . _material ) self . _geom_id = - 1 self . _activated = False self . _specific_collision_geom_ids = specific_collision_geom_ids