def __init__()

in robogym/envs/rearrange/simulation/composer.py [0:0]


    def __init__(self, random_state=None, mesh_path: Optional[Union[list, str]] = None):
        super().__init__(random_state=random_state)

        if mesh_path is None:
            # Default to both YCB meshes and geoms
            self._mesh_paths = [self.YCB_ASSET_PATH, self.GEOM_ASSET_PATH]
        elif isinstance(mesh_path, str):
            self._mesh_paths = [mesh_path]
        else:
            assert isinstance(mesh_path, list)
            self._mesh_paths = mesh_path

        # Find meshes (and cache for performance).
        for path in self._mesh_paths:
            if path not in self.PRIMITIVES_CACHE:
                self.PRIMITIVES_CACHE[path] = find_stls(path)

        self._meshes = {p: self.PRIMITIVES_CACHE[p] for p in self._mesh_paths}
        assert (
            sum(map(len, self._meshes.values())) > 0
        ), f"Did not find any .stl files in {self._mesh_paths}"