Ghost Link: Adjust the zero check for inertial, Avoid errors in behavior when there is no inertia or mass#107
Merged
Conversation
Collaborator
Author
|
Current State: Draft
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ft-lab
commented
May 20, 2026
Collaborator
Author
|
I've moved this PR to code review. Since we needed to change the specification regarding the removal of rigid bodies to address the proposal in Issue #106, I have also updated |
andrewkaufman
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #106
inertiaormassvalues and they are both zero, it will now be identified as a ghost link.Ghost Link determination
The following are all treated as ghost links.
Change the rules for Ghost Link
Consider a joint with the following link hierarchy.
https://github.com/newton-physics/urdf-usd-converter/blob/main/tests/data/link_skip_ghost_link_chain.urdf
BaseLinkandlink_boxhave visual, and collision properties.In this case, the URDF has the following joints.
Implementation up to PR #103
The rigid body of a link identified as a "ghost link" is deleted if it is a "ghost link all the way to the end".
The converted USD is handled as follows.
The “link_box” at the end is not a ghost link.
In this link hierarchy, even if there were ghost links, the rigid bodies and joints of the ghost links located in the middle of the hierarchy were not removed.
This implementation
We have implemented a change to remove the rigid body of the link prim when the following conditions are met.
In this example, the link structure and joints are as follows.
The rigid bodies assigned to the prims of
ghost_link,ghost_link_2, andghost_link_3have been removed.joint1 (Fixed) : BaseLink - ghost_link<-- will be deletedjoint2 (Fixed) : ghost_link - ghost_link_2<-- will be deletedjoint3 (Fixed) : ghost_link_2 - ghost_link_3<-- will be deletedThe conditions for deleting a joint are as follows.
This rule is the same as PR #103.
In USD,
PhysicsJoint'sbody0specifies the parent prim, andbody1specifies the child prim.Why do we need to remove the rigid body from the ghost link?
As pointed out in Issue #106, leaving ghost links that lack inertia and mass will result in warnings or errors.
This does not always occur; in some cases, no warnings or errors were generated depending on the prim hierarchy or joint settings.
In particular, Newton often exhibits incorrect behavior when there are rigid bodies in a ghost link.
As a result, we had to remove the Ghost Link's rigid body.
Additionally, in the USD PhysicsJoint, an error will occur if the prim referenced by body1 (out of body0 and body1) does not have a rigid body.
This is not a problem if the prim referenced by
body0does not contain a rigid body.Under these conditions, if there is a possibility that a ghost link (a prim without a rigid body) will be assigned to body1, that joint will not be created.
Unit tests
I have added a URDF and unit tests for checking the zero values of inertial and mass.
TODO
There was one part where the specifications needed to be changed, so I’ll add that information.Since the checks using the test repository are still incomplete, I will review them.I will check whether changes are needed todocs/concept_mapping.md.Checklist