(self,
             platform_length=1.,
             gap_length=2.5,
             corridor_width=4,
             corridor_length=40,
             ground_rgba=(0.5, 0.5, 0.5, 1),
             visible_side_planes=False,
             aesthetic='default',
             name='gaps_corridor')
Builds the corridor.

    Args:
      platform_length: A number or a `composer.variation.Variation` object that
        specifies the size of the platforms along the corridor.
      gap_length: A number or a `composer.variation.Variation` object that
        specifies the size of the gaps along the corridor.
      corridor_width: A number or a `composer.variation.Variation` object that
        specifies the width of the corridor.
      corridor_length: A number or a `composer.variation.Variation` object that
        specifies the length of the corridor.
      ground_rgba: A sequence of 4 numbers or a `composer.variation.Variation`
        object specifying the color of the ground.
      visible_side_planes: Whether to the side planes that bound the corridor's
        perimeter should be rendered.
      aesthetic: option to adjust the material properties and skybox
      name: The name of this arena.
Builds the corridor.
Builds the corridor .
def _build(self,
             platform_length=1.,
             gap_length=2.5,
             corridor_width=4,
             corridor_length=40,
             ground_rgba=(0.5, 0.5, 0.5, 1),
             visible_side_planes=False,
             aesthetic='default',
             name='gaps_corridor'):
    """Builds the corridor.

    Args:
      platform_length: A number or a `composer.variation.Variation` object that
        specifies the size of the platforms along the corridor.
      gap_length: A number or a `composer.variation.Variation` object that
        specifies the size of the gaps along the corridor.
      corridor_width: A number or a `composer.variation.Variation` object that
        specifies the width of the corridor.
      corridor_length: A number or a `composer.variation.Variation` object that
        specifies the length of the corridor.
      ground_rgba: A sequence of 4 numbers or a `composer.variation.Variation`
        object specifying the color of the ground.
      visible_side_planes: Whether to the side planes that bound the corridor's
        perimeter should be rendered.
      aesthetic: option to adjust the material properties and skybox
      name: The name of this arena.
    """
    super()._build(
        corridor_width=corridor_width,
        corridor_length=corridor_length,
        visible_side_planes=visible_side_planes,
        name=name)

    self._platform_length = platform_length
    self._gap_length = gap_length
    self._ground_rgba = ground_rgba
    self._aesthetic = aesthetic

    if self._aesthetic != 'default':
      ground_info = locomotion_arenas_assets.get_ground_texture_info(aesthetic)
      sky_info = locomotion_arenas_assets.get_sky_texture_info(aesthetic)
      texturedir = locomotion_arenas_assets.get_texturedir(aesthetic)
      self._mjcf_root.compiler.texturedir = texturedir

      self._ground_texture = self._mjcf_root.asset.add(
          'texture', name='aesthetic_texture', file=ground_info.file,
          type=ground_info.type)
      self._ground_material = self._mjcf_root.asset.add(
          'material', name='aesthetic_material', texture=self._ground_texture,
          texuniform='true')
      # remove existing skybox
      for texture in self._mjcf_root.asset.find_all('texture'):
        if texture.type == 'skybox':
          texture.remove()
      self._skybox = self._mjcf_root.asset.add(
          'texture', name='aesthetic_skybox', file=sky_info.file,
          type='skybox', gridsize=sky_info.gridsize,
          gridlayout=sky_info.gridlayout)

    self._ground_body = self._mjcf_root.worldbody.add('body', name='ground')
def _build ( self , platform_length = 1. , gap_length = 2.5 , corridor_width = 4 , corridor_length = 40 , ground_rgba = ( 0.5 , 0.5 , 0.5 , 1 ) , visible_side_planes = False , aesthetic = 'default' , name = 'gaps_corridor' ) : super ( ) . _build ( corridor_width = corridor_width , corridor_length = corridor_length , visible_side_planes = visible_side_planes , name = name ) self . _platform_length = platform_length self . _gap_length = gap_length self . _ground_rgba = ground_rgba self . _aesthetic = aesthetic if self . _aesthetic != 'default' : ground_info = locomotion_arenas_assets . get_ground_texture_info ( aesthetic ) sky_info = locomotion_arenas_assets . get_sky_texture_info ( aesthetic ) texturedir = locomotion_arenas_assets . get_texturedir ( aesthetic ) self . _mjcf_root . compiler . texturedir = texturedir self . _ground_texture = self . _mjcf_root . asset . add ( 'texture' , name = 'aesthetic_texture' , file = ground_info . file , type = ground_info . type ) self . _ground_material = self . _mjcf_root . asset . add ( 'material' , name = 'aesthetic_material' , texture = self . _ground_texture , texuniform = 'true' ) # remove existing skybox for texture in self . _mjcf_root . asset . find_all ( 'texture' ) : if texture . type == 'skybox' : texture . remove ( ) self . _skybox = self . _mjcf_root . asset . add ( 'texture' , name = 'aesthetic_skybox' , file = sky_info . file , type = 'skybox' , gridsize = sky_info . gridsize , gridlayout = sky_info . gridlayout ) self . _ground_body = self . _mjcf_root . worldbody . add ( 'body' , name = 'ground' )