Skip to content

Use Newton loading URDF#10

Open
Tadinu wants to merge 5 commits intoNVlabs:mainfrom
Tadinu:newton
Open

Use Newton loading URDF#10
Tadinu wants to merge 5 commits intoNVlabs:mainfrom
Tadinu:newton

Conversation

@Tadinu
Copy link

@Tadinu Tadinu commented Dec 6, 2025

Hi @kavanwyk,

Thank you very much for this amazing repo for the community, the first afaik on using Warp for batched Fabrics!
Earlier, we used to only have https://github.com/tud-amr/fabrics, a great one by @maxspahn.

This PR mostly is only for reference regarding:

  • Using the latest warp, which deprecated warp.sim, in favor of Newton.
  • Using Newton for URDF loading
  • Visualizing palm targets

Notes:

  • Regarding RobotVisualizer, which currently uses IsaacSim, in line with this PR, the results could be also probably visualized by the more light-weight in Newton.
  • Unfortunately, the changes are full of formattings done automatically by IDE, so it may be really hard for reviewing (my great apology🙏).
  • Mostly, the main changes are:
    • pyproject.toml, setup.py, deps.txt: remove urdfpy
    • README.md: update installation steps by replacing one for urdfpy with newton
    • fabric.py:
      • add FabricJointMeta data class, hosting joint info: name, type, upper/lower limit
      • BaseFabric: remove urdfpy_robot, joint_names -> joints_meta, _num_joints -> property num_joints: len(self.joints_meta)
      • load_robot(): use newton.ModelBuilder instead of wp.sim.ModelBuilder, loading joints meta directly from the former.
        -> Keep newton.ModelBuilder as class member for more conveniently later browsing, as the compiled model possibly resides in GPU.
  • import_urdf.py - parse_urdf_annotated():
    • use newton.parse_urdf(), removing supporting utils like KinematicTree, expand_link() for the old loading function.
    • then save the parsed model meta into UrdfInfo (Most important changes)
  • kinematics.py:
    • Joint type enums from wp.sim -> newton.JointType
    • KinematicsBase init: wp.sim.ModelBuilder -> newton.ModelBuilder
  • world_mesh_model.py - create_object_model(): wp.sim.ModelBuilder -> newton.ModelBuilder

visualize target & draw body collision spheres
BaseFabric-load_robot(): move enabled joint check from all_non_fixed_joints -> self.joints_meta
Read joint upper/lower limit from Newton model, instead of Model Builder
… joint_qd_start

BaseFabric.load_robot(): simplify joints_meta composing
@maxspahn
Copy link

@Tadinu Thanks for mentioning me ❤️

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.

2 participants