Repository navigation
Use URRobotCfg in demo UR robots - #348
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
JointDrivePropertiesCfgis still used later in this script (e.g., increate_container()), but it was removed from theembodichain.lab.sim.cfgimports. This will raise aNameErrorat runtime when constructingArticulationCfg(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 | |||
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
This PR updates the UR-based demo scripts in
examples/sim/demoto construct their robot configs fromURRobotCfginstead 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
Screenshots
N/A
Checklist
black .command to format the code base.