Fix inertia matrix format in usd parser#439
Conversation
Signed-off-by: camevor <camevor@nvidia.com>
📝 WalkthroughWalkthroughThe update changes how the inertia matrix for rigid bodies is assigned in the Changes
Sequence Diagram(s)sequenceDiagram
participant USDFile
participant parse_usd
participant builder
USDFile->>parse_usd: Provide rigid body data (with PhysicsMassAPI)
parse_usd->>parse_usd: Extract inertia as NumPy array
parse_usd->>parse_usd: Wrap inertia in wp.mat33
parse_usd->>builder: Assign body_inertia[body_id] = wp.mat33(inertia)
parse_usd->>parse_usd: (If needed) Compute inverse inertia with wp.mat33
parse_usd->>builder: Assign body_inv_inertia[body_id]
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
newton/utils/import_usd.py(1 hunks)
⏰ Context from checks skipped due to timeout of 900000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Run GPU Unit Tests on AWS EC2 (Pull Request)
🔇 Additional comments (1)
newton/utils/import_usd.py (1)
987-987: LGTM! Type consistency fix implemented correctly.The change properly wraps the numpy array in
wp.mat33()to ensure type consistency with the expected format inModelBuilder.body_inertia.
Signed-off-by: camevor <camevor@nvidia.com>
Signed-off-by: camevor <camevor@nvidia.com>
Description
In
ModelBuilder,self.body_inertiais expected to be a list ofwp.mat33. The USD parser could add anp.ndarrayinstead.Newton Migration Guide
docs/migration.rstis up-to dateBefore your PR is "Ready for review"
newton/tests/test_examples.py)pre-commit run -aSummary by CodeRabbit