-
Notifications
You must be signed in to change notification settings - Fork 291
MeshShape: adopt TriMesh internal representation (issue #453) #2325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Replace aiScene* with dart::math::TriMesh<double> as the internal mesh representation in MeshShape. This decouples mesh data from Assimp, enabling format-agnostic mesh handling. Key changes: - MeshShape stores TriMesh internally, converts to aiScene on-demand for backward compatibility - Collision detectors (ODE, Bullet, FCL) updated to use TriMesh API - ArrowShape and InteractiveFrame generate TriMesh directly (no aiScene intermediates) - SoftMeshShape uses TriMesh for soft body vertex updates - OSG rendering uses getMaterials() for Assimp-free material/texture access - Python bindings expose TriMesh (dartpy.math.TriMesh) with zero Assimp types - Added TriMesh.cpp Python bindings with complete API (addVertex, addTriangle, etc.) - Deprecated aiScene-based API maintained for backward compatibility with warnings - Moved AssimpInputResourceAdaptor to dart/dynamics/detail/ (deprecated) Backward compatibility: - Core C++ API: Full compatibility maintained (deprecated methods work with warnings) - Python bindings: Breaking changes allowed - now 100% TriMesh-only - OSG rendering: Breaking changes allowed - materials Assimp-free, scene graph uses deprecated API Documentation: - Added design rationale to docs/onboarding/dynamics.md - Added Python bindings info to docs/onboarding/python-bindings.md - Removed completed task directory docs/dev_tasks/mesh_loader/ (cherry picked from commit b74f9e6)
(cherry picked from commit a1013a2)
(cherry picked from commit 8affbec)
(cherry picked from commit 4712108)
Remove the newly-added dart/dynamics/fwd.hpp which conflicted with existing Fwd.hpp on case-insensitive filesystems and broke macOS/Windows builds. Also make Linux CI install pixi to a per-job path to avoid setup-pixi collisions, and drop an invalid sccache-action input.
- ArrowShape: use dart::math::pi instead of deprecated constants API (clang -Werror,-Wdeprecated-declarations). - MeshShape: export MeshHandle so external subclasses (and unit tests) can link on Windows.
Avoid use-after-free when setMesh() is called with the aiScene pointer returned by getMesh(), and normalize TriMesh constructor meshPath semantics. Add unit coverage and drop an unused test stub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2325 +/- ##
=========================================
+ Coverage 0 63.27% +63.27%
=========================================
Files 0 366 +366
Lines 0 33739 +33739
Branches 0 4461 +4461
=========================================
+ Hits 0 21348 +21348
- Misses 0 12391 +12391
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-authored-by: Jeongseok Lee <[email protected]>
Addresses #453.
dynamics::MeshShapeto store mesh data inmath::TriMesh<double>(deprecatedaiScene*accessors retained via lazy conversion).utils::MeshLoader(Assimp-backed) to return TriMesh and wires it into parsers/collision/rendering paths.Verified locally (16 cores):
DART_PARALLEL_JOBS=16 CTEST_PARALLEL_LEVEL=16 pixi run test-allDART_PARALLEL_JOBS=16 CTEST_PARALLEL_LEVEL=16 pixi run -e gazebo test-gzScreencast.from.2025-12-20.07-37-37.mp4
Before creating a pull request
pixi run test-allto lint, build, and test your changes