(self,
             corridor_width=4,
             corridor_length=40,
             visible_side_planes=True,
             name='empty_corridor')
Builds the corridor.

    Args:
      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.
      visible_side_planes: Whether to the side planes that bound the corridor's
        perimeter should be rendered.
      name: The name of this arena.
Builds the corridor.
Builds the corridor .
def _build(self,
             corridor_width=4,
             corridor_length=40,
             visible_side_planes=True,
             name='empty_corridor'):
    """Builds the corridor.

    Args:
      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.
      visible_side_planes: Whether to the side planes that bound the corridor's
        perimeter should be rendered.
      name: The name of this arena.
    """
    super()._build(name=name)

    self._corridor_width = corridor_width
    self._corridor_length = corridor_length

    self._walls_body = self._mjcf_root.worldbody.add('body', name='walls')

    self._mjcf_root.visual.map.znear = 0.0005
    self._mjcf_root.asset.add(
        'texture', type='skybox', builtin='gradient',
        rgb1=[0.4, 0.6, 0.8], rgb2=[0, 0, 0], width=100, height=600)
    self._mjcf_root.visual.headlight.set_attributes(
        ambient=[0.4, 0.4, 0.4], diffuse=[0.8, 0.8, 0.8],
        specular=[0.1, 0.1, 0.1])

    alpha = _DEFAULT_ALPHA if visible_side_planes else 0.0
    self._ground_plane = self._mjcf_root.worldbody.add(
        'geom', type='plane', rgba=[0.5, 0.5, 0.5, 1], size=[1, 1, 1])
    self._left_plane = self._mjcf_root.worldbody.add(
        'geom', type='plane', xyaxes=[1, 0, 0, 0, 0, 1], size=[1, 1, 1],
        rgba=[1, 0, 0, alpha], group=_SIDE_WALLS_GEOM_GROUP)
    self._right_plane = self._mjcf_root.worldbody.add(
        'geom', type='plane', xyaxes=[-1, 0, 0, 0, 0, 1], size=[1, 1, 1],
        rgba=[1, 0, 0, alpha], group=_SIDE_WALLS_GEOM_GROUP)
    self._near_plane = self._mjcf_root.worldbody.add(
        'geom', type='plane', xyaxes=[0, 1, 0, 0, 0, 1], size=[1, 1, 1],
        rgba=[1, 0, 0, alpha], group=_SIDE_WALLS_GEOM_GROUP)
    self._far_plane = self._mjcf_root.worldbody.add(
        'geom', type='plane', xyaxes=[0, -1, 0, 0, 0, 1], size=[1, 1, 1],
        rgba=[1, 0, 0, alpha], group=_SIDE_WALLS_GEOM_GROUP)

    self._current_corridor_length = None
    self._current_corridor_width = None
def _build ( self , corridor_width = 4 , corridor_length = 40 , visible_side_planes = True , name = 'empty_corridor' ) : super ( ) . _build ( name = name ) self . _corridor_width = corridor_width self . _corridor_length = corridor_length self . _walls_body = self . _mjcf_root . worldbody . add ( 'body' , name = 'walls' ) self . _mjcf_root . visual . map . znear = 0.0005 self . _mjcf_root . asset . add ( 'texture' , type = 'skybox' , builtin = 'gradient' , rgb1 = [ 0.4 , 0.6 , 0.8 ] , rgb2 = [ 0 , 0 , 0 ] , width = 100 , height = 600 ) self . _mjcf_root . visual . headlight . set_attributes ( ambient = [ 0.4 , 0.4 , 0.4 ] , diffuse = [ 0.8 , 0.8 , 0.8 ] , specular = [ 0.1 , 0.1 , 0.1 ] ) alpha = _DEFAULT_ALPHA if visible_side_planes else 0.0 self . _ground_plane = self . _mjcf_root . worldbody . add ( 'geom' , type = 'plane' , rgba = [ 0.5 , 0.5 , 0.5 , 1 ] , size = [ 1 , 1 , 1 ] ) self . _left_plane = self . _mjcf_root . worldbody . add ( 'geom' , type = 'plane' , xyaxes = [ 1 , 0 , 0 , 0 , 0 , 1 ] , size = [ 1 , 1 , 1 ] , rgba = [ 1 , 0 , 0 , alpha ] , group = _SIDE_WALLS_GEOM_GROUP ) self . _right_plane = self . _mjcf_root . worldbody . add ( 'geom' , type = 'plane' , xyaxes = [ - 1 , 0 , 0 , 0 , 0 , 1 ] , size = [ 1 , 1 , 1 ] , rgba = [ 1 , 0 , 0 , alpha ] , group = _SIDE_WALLS_GEOM_GROUP ) self . _near_plane = self . _mjcf_root . worldbody . add ( 'geom' , type = 'plane' , xyaxes = [ 0 , 1 , 0 , 0 , 0 , 1 ] , size = [ 1 , 1 , 1 ] , rgba = [ 1 , 0 , 0 , alpha ] , group = _SIDE_WALLS_GEOM_GROUP ) self . _far_plane = self . _mjcf_root . worldbody . add ( 'geom' , type = 'plane' , xyaxes = [ 0 , - 1 , 0 , 0 , 0 , 1 ] , size = [ 1 , 1 , 1 ] , rgba = [ 1 , 0 , 0 , alpha ] , group = _SIDE_WALLS_GEOM_GROUP ) self . _current_corridor_length = None self . _current_corridor_width = None