diff --git a/examples/meshcat-viewer.py b/examples/meshcat-viewer.py index 2191f5e00fc1f6609a69323f0ed70627bee016f5..38694424685a9a74e5dbefcd3068fa9cebb4cc61 100644 --- a/examples/meshcat-viewer.py +++ b/examples/meshcat-viewer.py @@ -18,6 +18,13 @@ mesh_dir = model_path urdf_model_path = str(os.path.abspath(os.path.join(model_path, 'romeo_description/urdf/romeo_small.urdf'))) model, collision_model, visual_model = pin.buildModelsFromUrdf(urdf_model_path, mesh_dir, pin.JointModelFreeFlyer()) + +# Currently, MeshCat is not able to retrieve the scaling from DAE files. Set it manually. +for geom in visual_model.geometryObjects: + s = geom.meshScale + s *= 0.01 + geom.meshScale = s + viz = MeshcatVisualizer(model, collision_model, visual_model) # pin.setGeometryMeshScales(visual_model,0.01)