Skip to content

[Bug Report] MjcfConverter(fix_base=True) with fix_root_link=True is refused on Newton: Cannot merge joint ... FixedJoint into a D6 joint #9314

Backlog

Description

@sysmic3

Describe the bug

An MJCF converted with MjcfConverterCfg(fix_base=True) cannot be spawned with fix_root_link=True on Newton. The converter writes a fixed joint from the asset's root Xform to the base link (/allegro_right/Geometry/palm/PhysicsFixedJoint, body0 /allegro_right), fix_root_link=True adds a second one on the same link, and Newton's importer, which merges the joints between one body pair into a D6, refuses fixed joints. PhysX loads the pair.

fix_root_link=True unset
Newton (MJWarp) ValueError loads, 16 joints
PhysX loads, 16 joints loads, 16 joints
ValueError: Cannot merge joint /World/envs/env_0/Robot/Geometry/palm/FixedJoint of type FixedJoint into a D6 joint. Only RevoluteJoint and PrismaticJoint are supported for merging.

Steps to reproduce

"""MjcfConverter(fix_base=True) + fix_root_link=True: loads on PhysX, refused by Newton's importer.

    git clone --depth 1 --filter=blob:none --sparse https://github.com/google-deepmind/mujoco_menagerie
    (cd mujoco_menagerie && git sparse-checkout set wonik_allegro)
    python repro_weld.py convert mujoco_menagerie/wonik_allegro/right_hand.xml
    python repro_weld.py physx
    python repro_weld.py newton
"""
import argparse, os, tempfile, traceback
from isaaclab.app import add_launcher_args, launch_simulation

p = argparse.ArgumentParser()
p.add_argument("what", choices=["convert", "physx", "newton"])
p.add_argument("mjcf", nargs="?")
p.add_argument("--free-root", action="store_true", help="control: leave fix_root_link unset")
add_launcher_args(p)
a = p.parse_args()
out = os.path.join(tempfile.gettempdir(), "allegro_fix_base")
if a.what == "convert":
    with launch_simulation(None, {"require_kit": True, "headless": True}):
        from isaaclab.sim.converters import MjcfConverter, MjcfConverterCfg
        from pxr import Usd
        usd = MjcfConverter(MjcfConverterCfg(asset_path=os.path.abspath(a.mjcf), usd_dir=out, fix_base=True, force_usd_conversion=True)).usd_path
        open(out + ".path", "w").write(usd)
        stage = Usd.Stage.Open(usd)
        for x in stage.Traverse():
            if x.GetTypeName() == "PhysicsFixedJoint":
                print("FIXED JOINT", x.GetPath(), "body0", x.GetRelationship("physics:body0").GetTargets(), flush=True)
else:
    if a.what == "newton":
        from isaaclab_newton.physics import MJWarpSolverCfg, NewtonCfg
        physics = NewtonCfg(solver_cfg=MJWarpSolverCfg())
    else:
        from isaaclab_physx.physics import PhysxCfg
        physics = PhysxCfg()
    with launch_simulation(physics, a):
        try:
            import isaaclab.sim as sim_utils
            from isaaclab.actuators import ImplicitActuatorCfg
            from isaaclab.assets import ArticulationCfg
            from isaaclab.scene import InteractiveSceneCfg
            from isaaclab.utils import configclass, instantiate

            @configclass
            class Scene(InteractiveSceneCfg):
                robot = ArticulationCfg(prim_path="{ENV_REGEX_NS}/Robot",
                                        spawn=sim_utils.UsdFileCfg(usd_path=open(out + ".path").read(), fix_root_link=None if a.free_root else True),
                                        init_state=ArticulationCfg.InitialStateCfg(joint_pos={".*": 0.3}),
                                        actuators={"all": ImplicitActuatorCfg(joint_names_expr=[".*"], stiffness=1.0, damping=0.1)})

            sim = sim_utils.SimulationContext(sim_utils.SimulationCfg(physics=physics, device=a.device))
            scene = instantiate(Scene(num_envs=1, env_spacing=1.0))
            sim.reset()
            print("LOADED", a.what, "joints", scene["robot"].num_joints, flush=True)
        except Exception as e:
            print("REFUSED", a.what, type(e).__name__, str(e)[:300], flush=True)
        os._exit(0)

System Info

  • Commit: d96dded
  • Isaac Sim Version: 6.2.0 (pip), Newton 1.9.0.dev0 (ea900536)
  • OS: Ubuntu 24.04
  • GPU: RTX 5090
  • CUDA: 13.0 (torch 2.11.0+cu130)
  • GPU Driver: 595.99.02

Additional context

#8164 touches the neighbouring case (an articulation rooted at its world joint). The run above is on a commit after it: here the root is still on the link, so a second joint is added. The same pair could also be accepted by Newton's importer as one weld; I filed it here because both joints are authored by Isaac Lab. Workaround: a layer that deactivates the converter's fixed joint, or leaving fix_root_link unset.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Acceptance Criteria

  • fix_root_link=True on an asset whose base link is already welded to its root Xform does not author a second fixed joint (or the error names the two joints and what to do)

Activity

  1. added
    bug
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions