Skip to content

Conversation

@jslee02
Copy link
Member

@jslee02 jslee02 commented Dec 17, 2025

Addresses #453.

  • Refactors dynamics::MeshShape to store mesh data in math::TriMesh<double> (deprecated aiScene* accessors retained via lazy conversion).
  • Adds/updates utils::MeshLoader (Assimp-backed) to return TriMesh and wires it into parsers/collision/rendering paths.
  • Fixes ArrowShape + InteractiveFrame regressions when rendering without vertex colors (materials/shape-color handling, cached aiScene invalidation).
  • Adds C++ + Python unit tests for TriMesh/MeshShape/MeshLoader.

Verified locally (16 cores):

  • DART_PARALLEL_JOBS=16 CTEST_PARALLEL_LEVEL=16 pixi run test-all
  • DART_PARALLEL_JOBS=16 CTEST_PARALLEL_LEVEL=16 pixi run -e gazebo test-gz
pixi run ex atlas_simbicon
Screencast.from.2025-12-20.07-37-37.mp4

Before creating a pull request

  • Run pixi run test-all to lint, build, and test your changes
  • Add unit tests for new functionality
  • Document new methods and classes
  • Add Python bindings (dartpy) if applicable

jeongseok-meta and others added 20 commits December 13, 2025 07:46
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 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.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 81.87702% with 168 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.27%. Comparing base (cfa3d66) to head (0d41e22).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dart/dynamics/MeshShape.cpp 80.77% 114 Missing ⚠️
dart/dynamics/ArrowShape.cpp 65.57% 42 Missing ⚠️
dart/utils/MeshLoader.hpp 88.88% 12 Missing ⚠️
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     
Flag Coverage Δ
unittests 63.27% <81.87%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dart/collision/fcl/FCLCollisionDetector.cpp 87.27% <100.00%> (ø)
dart/collision/fcl/FCLCollisionObject.cpp 95.23% <100.00%> (ø)
dart/dynamics/MeshMaterial.hpp 100.00% <100.00%> (ø)
dart/dynamics/MeshShape.hpp 100.00% <100.00%> (ø)
dart/dynamics/SoftMeshShape.cpp 79.10% <100.00%> (ø)
...art/dynamics/detail/AssimpInputResourceAdaptor.cpp 76.66% <100.00%> (ø)
dart/math/TriMesh.hpp 100.00% <ø> (ø)
dart/math/detail/Mesh-impl.hpp 24.24% <100.00%> (ø)
dart/math/detail/TriMesh-impl.hpp 27.63% <100.00%> (ø)
dart/utils/SkelParser.cpp 72.66% <100.00%> (ø)
... and 7 more

... and 349 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jslee02 jslee02 added this to the DART 7.0 milestone Dec 17, 2025
@jslee02
Copy link
Member Author

jslee02 commented Dec 20, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@jslee02
Copy link
Member Author

jslee02 commented Dec 20, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@jslee02
Copy link
Member Author

jslee02 commented Dec 20, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@jslee02
Copy link
Member Author

jslee02 commented Dec 20, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@jslee02
Copy link
Member Author

jslee02 commented Dec 20, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@jslee02
Copy link
Member Author

jslee02 commented Dec 20, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Breezy!

ℹ️ 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".

@jslee02 jslee02 enabled auto-merge (squash) December 20, 2025 17:35
@jslee02 jslee02 disabled auto-merge December 20, 2025 19:19
@jslee02 jslee02 merged commit fadd164 into main Dec 20, 2025
23 of 24 checks passed
@jslee02 jslee02 deleted the refactor/mesh_loader branch December 20, 2025 19:19
@jslee02 jslee02 mentioned this pull request Dec 20, 2025
jslee02 added a commit that referenced this pull request Dec 20, 2025
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.

3 participants