leggedrobotics / terrain-generator

MIT License
140 stars 19 forks source link

Trimesh not all meshes are volumes ValueError #6

Open gmmyung opened 4 months ago

gmmyung commented 4 months ago
Traceback (most recent call last):
  File "/home/gmmyung/Downloads/terrain-generator/examples/generate_with_wfc.py"
, line 265, in <module>
    create_mesh_from_cfg(
  File "/home/gmmyung/Downloads/terrain-generator/examples/generate_with_wfc.py"
, line 81, in create_mesh_from_cfg
    tiles, wave, wave_order, wave_names = solve_with_wfc(cfg, shape, initial_til
e_name)
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^
  File "/home/gmmyung/Downloads/terrain-generator/examples/generate_with_wfc.py"
, line 35, in solve_with_wfc
    tiles = create_mesh_pattern(cfg)
            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gmmyung/Downloads/terrain-generator/terrain_generator/trimesh_tile
s/mesh_parts/create_tiles.py", line 101, in create_mesh_pattern
    tiles = ray.get(tiles)
            ^^^^^^^^^^^^^^
  File "/home/gmmyung/miniforge3/envs/raisim/lib/python3.11/site-packages/ray/_p
rivate/auto_init_hook.py", line 21, in auto_init_wrapper
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/gmmyung/miniforge3/envs/raisim/lib/python3.11/site-packages/ray/_p
rivate/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/gmmyung/miniforge3/envs/raisim/lib/python3.11/site-packages/ray/_p
rivate/worker.py", line 2656, in get
    values, debugger_breakpoint = worker.get_objects(object_refs, timeout=timeou
t)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^
  File "/home/gmmyung/miniforge3/envs/raisim/lib/python3.11/site-packages/ray/_p
rivate/worker.py", line 871, in get_objects
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(ValueError): ray::create_mesh_tile() (pid=922212, ip
=192.168.1.13)
  File "/home/gmmyung/Downloads/terrain-generator/terrain_generator/trimesh_tile
s/mesh_parts/create_tiles.py", line 79, in create_mesh_tile
    mesh = cached_mesh_gen()
           ^^^^^^^^^^^^^^^^^
  File "/home/gmmyung/Downloads/terrain-generator/terrain_generator/utils/utils.
py", line 99, in mesh_gen
    mesh = mesh_gen_fn(cfg)
           ^^^^^^^^^^^^^^^^
  File "/home/gmmyung/Downloads/terrain-generator/terrain_generator/trimesh_tile
s/mesh_parts/basic_parts.py", line 229, in create_platform_mesh
    mesh = merge_meshes(meshes, cfg.minimal_triangles)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gmmyung/Downloads/terrain-generator/terrain_generator/utils/mesh_u
tils.py", line 26, in merge_meshes
    mesh = trimesh.boolean.union(meshes, engine=engine)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gmmyung/miniforge3/envs/raisim/lib/python3.11/site-packages/trimes
h/boolean.py", line 75, in union
    raise ValueError("Not all meshes are volumes!")
ValueError: Not all meshes are volumes!

This check was introduced after trimesh v4.1.4. This is a problem because that version of trimesh does not support numpy 2.0. https://github.com/mikedh/trimesh/issues/2156