Skip to content

Add support for mesh shapes parametrization#502

Draft
flferretti wants to merge 14 commits intomainfrom
mesh_scaling
Draft

Add support for mesh shapes parametrization#502
flferretti wants to merge 14 commits intomainfrom
mesh_scaling

Conversation

@flferretti
Copy link
Copy Markdown
Collaborator

@flferretti flferretti commented Feb 17, 2026

This pull request introduces support for mesh-shaped links in the model for hardware parametrization.


📚 Documentation preview 📚: https://jaxsim--502.org.readthedocs.build//502/

@flferretti flferretti self-assigned this Feb 17, 2026
@flferretti flferretti force-pushed the mesh_scaling branch 2 times, most recently from f3cd74b to dfeeb8d Compare February 17, 2026 17:20
@flferretti flferretti requested a review from Copilot February 25, 2026 17:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds hardware-parametrization support for mesh-shaped links, including loading mesh geometry for inertia recomputation, exporting scaled meshes back to URDF, and adding regression/validation tests with new mesh-based test assets.

Changes:

  • Extend HW link metadata to support a new Mesh shape type and store per-link mesh data (vertices/faces/offset/uri).
  • Update model parsing/export and HW scaling logic to handle mesh scaling and preserve URDF visual/joint origins on export.
  • Add new tests and URDF/STL assets covering mixed primitive+mesh models and mesh export regressions.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_api_model_hw_parametrization.py Adds regression + mixed-shape tests for mesh metadata, scaling, and URDF export/import behavior.
tests/assets/test_cube.urdf Adds a simple mesh-only URDF fixture for tests.
tests/assets/mixed_shapes_robot.urdf Adds a mixed primitive+mesh URDF fixture for end-to-end parametrization/scaling tests.
tests/assets/cube.stl Adds a small cube STL mesh fixture used by the new URDFs/tests.
src/jaxsim/parsers/rod/utils.py Adds a helper to load/scale/center meshes and provide watertightness + volume for parametrization.
src/jaxsim/api/model.py Integrates mesh support into HW metadata computation, URDF export scaling for meshes, and rewrites scaling application logic.
src/jaxsim/api/kin_dyn_parameters.py Introduces Mesh enum value, stores mesh metadata on HwLinkMetadata, and adds mesh inertia computation path.
pyproject.toml Enables a Pixi preview feature flag (pixi-build).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants