Cable attachments to rigid bodies via Newton fixed joints#5731
Draft
mmichelis wants to merge 78 commits into
Draft
Cable attachments to rigid bodies via Newton fixed joints#5731mmichelis wants to merge 78 commits into
mmichelis wants to merge 78 commits into
Conversation
…BasisCurve in USD. Currently only supported in Newton backend as add_rod_graph
70acfd0 to
4e01db5
Compare
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
Adds a declarative way to weld a
CableObjectendpoint ("head"or"tail") to a rigid body on another spawned asset, realized as a Newton-native fixed joint at model-build time. No per-step Python synchronization is required — VBD (and other cross-articulation-aware solvers like XPBD) enforce the constraint natively each step.Continues on PR #5641.
New public API (
isaaclab_contrib.cable)CableAttachmentCfg— dataclass describing one weld:target_prim_path,cable_anchor("head"/"tail"), andcable_local_{pos,quat}/target_local_{pos,quat}for the parent/child joint frames.CableObjectCfg.attachments: list[CableAttachmentCfg]— zero or more attachments declared per cable.Cable builder hook (
cable_object.py)apply_cable_attachments_to_builderruns afteradd_registered_cables_to_builder, resolves head/tail body indices recorded on eachCableRegistryEntry, looks up the target body inbuilder.body_label(filtering bybody_worldso cloning binds to the correct env), and callsadd_joint_fixed.env_.*→env_{world_idx}) at hook time so they match the form of USD-imported sibling bodies underInteractiveScenecloning.CableRegistryEntrygainedhead_segment_body_indicesandtail_segment_body_indiceslists (one entry per world).CableObject.resetoverride (replaced by a unified VBD-wide soft reset, see below).VBD manager (
deformable/vbd_manager.py)eval_fkskip mask from "non-cable articulations" to_fk_maskcovering bothJointType.CABLEandJointType.FREEjoints — needed because rigid bodies welded to cables share the cable's articulation graph and VBD owns theirbody_qdirectly.NewtonVBDManager.reset(soft=...)override snaps every body (cable segments + rigid bodies) back to its rest-poseModel.body_qand clearsbody_q_prev,body_qd,body_inertia_qfor soft resets, replacing the previous cable-only reset.Demo
scripts/demos/cable_pendulum.py— spawns N cables, each with its tail welded to a rigid plug, optionally equally spaced; supports a wildcard-cloned variant.New tests
source/isaaclab_contrib/test/cable/test_cable_attachment.pyType of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there