Skip to content

Use URRobotCfg in demo UR robots - #348

Merged
yuecideng merged 2 commits into
mainfrom
enhance/urrobotcfg-demo-robots
Jul 2, 2026
Merged

yuecideng merged 2 commits into
mainfrom
enhance/urrobotcfg-demo-robots

Conversation

@yuecideng

Copy link
Copy Markdown
Contributor

Description

This PR updates the UR-based demo scripts in examples/sim/demo to construct their robot configs from URRobotCfg instead of assembling the UR arm manually in each file.

It keeps each demo's tool-specific overrides in place, including attached hand URDFs, TCP offsets, drive parameters, and initial joint positions.

Dependencies: none

Issue reference: none

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

N/A

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable.

Copilot AI review requested due to automatic review settings July 2, 2026 04:34
@yuecideng yuecideng added enhancement New feature or request robot Module related to robot labels Jul 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the UR-based simulation demo scripts under examples/sim/demo to build robot configurations via URRobotCfg (instead of manually assembling RobotCfg/URDFCfg per demo), while preserving each demo’s tool/hand-specific overrides (URDF attachments, TCP offsets, drive params, and initial joint states).

Changes:

  • Replaced per-demo manual UR10 arm configuration with URRobotCfg.from_dict(...) in the affected demos.
  • Kept demo-specific overrides (attached hand/gripper URDF components, TCP overrides, hand drive properties, init poses).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
examples/sim/demo/scoop_ice.py Switches UR10 robot construction to URRobotCfg.from_dict with BrainCo hand component + overrides.
examples/sim/demo/press_softbody.py Switches UR10 robot construction to URRobotCfg.from_dict for the softbody pressing demo.
examples/sim/demo/pick_up_cloth.py Switches UR10 robot construction to URRobotCfg.from_dict with gripper component + overrides.
Comments suppressed due to low confidence (1)

examples/sim/demo/scoop_ice.py:38

  • JointDrivePropertiesCfg is still used later in this script (e.g., in create_container()), but it was removed from the embodichain.lab.sim.cfg imports. This will raise a NameError at runtime when constructing ArticulationCfg(drive_pros=JointDrivePropertiesCfg(...)).
from embodichain.lab.sim.cfg import (
    RenderCfg,
    RigidObjectCfg,
    RigidBodyAttributesCfg,
    ArticulationCfg,
    RigidObjectGroupCfg,
    LightCfg,
)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

URDFCfg,
)
from embodichain.lab.gym.utils.gym_utils import add_env_launcher_args_to_parser
from embodichain.lab.sim.shapes import MeshCfg
@@ -31,20 +31,17 @@
from embodichain.lab.sim.objects import Robot, SoftObject
from embodichain.lab.sim.utility.action_utils import interpolate_with_distance
from embodichain.lab.sim.shapes import MeshCfg
@yuecideng
yuecideng merged commit 7f105c0 into main Jul 2, 2026
1 check failed
@yuecideng
yuecideng deleted the enhance/urrobotcfg-demo-robots branch July 2, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request robot Module related to robot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants