diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ed704177acd..e46de6d4677 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -142,6 +142,7 @@ Guidelines for modifications: * Yohan Choi * Yujian Zhang * Yun Liu +* Zehao Wang * Ziqi Fan * Zoe McCarthy * David Leon diff --git a/scripts/tools/convert_mesh.py b/scripts/tools/convert_mesh.py index 50b295397d3..4147f618d22 100644 --- a/scripts/tools/convert_mesh.py +++ b/scripts/tools/convert_mesh.py @@ -118,6 +118,18 @@ def main(): collision_props = schemas_cfg.CollisionPropertiesCfg(collision_enabled=args_cli.collision_approximation != "none") # Create Mesh converter config + collision_cfg = None + if args_cli.collision_approximation == 'convexDecomposition': + collision_cfg = schemas_cfg.ConvexDecompositionPropertiesCfg() + elif args_cli.collision_approximation == 'convexHull': + collision_cfg = schemas_cfg.ConvexHullPropertiesCfg() + elif args_cli.collision_approximation == 'boundingCube': + collision_cfg = schemas_cfg.BoundingCubePropertiesCfg() + elif args_cli.collision_approximation == "boundingSphere": + collision_cfg = schemas_cfg.BoundingSpherePropertiesCfg() + elif args_cli.collision_approximation == "meshSimplification": + collision_cfg = schemas_cfg.TriangleMeshSimplificationPropertiesCfg() + mesh_converter_cfg = MeshConverterCfg( mass_props=mass_props, rigid_props=rigid_props, @@ -127,7 +139,7 @@ def main(): usd_dir=os.path.dirname(dest_path), usd_file_name=os.path.basename(dest_path), make_instanceable=args_cli.make_instanceable, - collision_approximation=args_cli.collision_approximation, + mesh_collision_props=collision_cfg ) # Print info