Skip to content

[BREAKING][BUG FIX] Leverage diagonal mass of aligned free bodies.#2993

Merged
duburcqa merged 1 commit into
Genesis-Embodied-AI:mainfrom
duburcqa:align_free_body_diagonal_mass
Jun 29, 2026
Merged

[BREAKING][BUG FIX] Leverage diagonal mass of aligned free bodies.#2993
duburcqa merged 1 commit into
Genesis-Embodied-AI:mainfrom
duburcqa:align_free_body_diagonal_mass

Conversation

@duburcqa

@duburcqa duburcqa commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Description

Make the align morph option reframe a free body's root link to its composite center of mass and principal axes for mesh and fixed-child bodies, not just primitives (and per heterogeneous variant). The anchor is computed at load from the parsed collision geometry / explicit inertials, so a kinematic entity and the rigid body it visualizes map the same qpos to the same world geometry. With the inertia exactly diagonal in that frame, the diagonal-mass optimization zeroes the free body's within-link off-diagonal mass coupling to tighten the sparse Hessian band.

The composite anchor is density-independent only if a free body's links all specify a mass or all leave it estimated; a mixed subtree raises (for both rigid and kinematic entities), since otherwise the anchor — and thus the alignment — would depend on a material density a kinematic entity does not have.

How Has This Been Tested?

pytest tests/test_rigid_physics.py on CPU and Apple Metal. The test_align_* family covers mesh/URDF alignment, the relative-getter frame stripping, heterogeneous per-variant inertia, rigid/kinematic vAABB parity, and the mixed-mass gate; test_convexify and test_heterogeneous_physics_parity exercise the anchored mesh free bodies.

Checklist:

  • I read the CONTRIBUTING document.
  • I followed the Submitting Code Changes section of CONTRIBUTING document.
  • I tagged the title correctly (including BUG FIX/FEATURE/MISC/BREAKING)
  • I updated the documentation accordingly or no change is needed.
  • I tested my changes and added instructions on how to test it for reviewers.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@duburcqa duburcqa requested a review from YilingQiao as a code owner June 28, 2026 11:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

Reviewed commit: 7fa3e466fe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread genesis/engine/solvers/rigid/rigid_solver.py
@duburcqa duburcqa force-pushed the align_free_body_diagonal_mass branch from 7fa3e46 to 7772265 Compare June 28, 2026 11:32
@duburcqa duburcqa changed the title [MISC] Exploit diagonal mass of aligned free bodies for meshes and welded children [MISC] Exploit diagonal mass of aligned free bodies for meshes and fixed children. Jun 28, 2026
@duburcqa duburcqa force-pushed the align_free_body_diagonal_mass branch from 7772265 to a4c4923 Compare June 28, 2026 14:38
@duburcqa duburcqa changed the title [MISC] Exploit diagonal mass of aligned free bodies for meshes and fixed children. [MISC] Leverage diagonal mass of aligned free bodies for meshes and fixed children. Jun 28, 2026
@duburcqa duburcqa changed the title [MISC] Leverage diagonal mass of aligned free bodies for meshes and fixed children. [MISC] Leverage diagonal mass of aligned free bodies. Jun 28, 2026
@duburcqa

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

Reviewed commit: a4c4923134

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread genesis/engine/entities/rigid_entity/rigid_entity.py
@duburcqa duburcqa force-pushed the align_free_body_diagonal_mass branch from a4c4923 to 61ef114 Compare June 28, 2026 16:59
@github-actions

Copy link
Copy Markdown

⚠️ Abnormal Benchmark Result Detected ➡️ Report

@duburcqa duburcqa force-pushed the align_free_body_diagonal_mass branch from 61ef114 to b38dc3d Compare June 28, 2026 19:04
@duburcqa

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

Reviewed commit: b38dc3d9ca

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread genesis/engine/entities/rigid_entity/rigid_link.py
@duburcqa duburcqa force-pushed the align_free_body_diagonal_mass branch 2 times, most recently from 42559a7 to 324b7e5 Compare June 28, 2026 19:16
@github-actions

Copy link
Copy Markdown

⚠️ Abnormal Benchmark Result Detected ➡️ Report

@duburcqa duburcqa force-pushed the align_free_body_diagonal_mass branch from 324b7e5 to 7f36c97 Compare June 28, 2026 22:38
@duburcqa

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

Reviewed commit: 7f36c97d51

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread genesis/engine/mesh.py Outdated
@github-actions

Copy link
Copy Markdown

🔴 Benchmark Regression Detected ➡️ Report

@duburcqa duburcqa force-pushed the align_free_body_diagonal_mass branch from e2fc843 to 72f637e Compare June 29, 2026 08:33
@duburcqa duburcqa merged commit bd6889b into Genesis-Embodied-AI:main Jun 29, 2026
17 of 20 checks passed
@duburcqa duburcqa changed the title [MISC] Leverage diagonal mass of aligned free bodies. [BREAKING][BUG FIX] Leverage diagonal mass of aligned free bodies. Jun 29, 2026
@duburcqa duburcqa deleted the align_free_body_diagonal_mass branch June 29, 2026 11:30
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.

1 participant