Add URRobotCfg: UR family (ur3/3e/5/5e/10/10e)#331
Open
yuecideng wants to merge 2 commits into
Open
Conversation
One RobotCfg subclass switchable via robot_type; DH params owned by URSolverCfg, the robot config owns URDF/control parts/drive props/attrs. Per-variant max_effort scaled by robot size; UR5's lowercase joint names handled explicitly. Routes build_pk_serial_chain through _pk_urdf_path. Also fixes URSolverCfg.class_type (inherited "BaseSolver" -> "URSolver") so the solver can be deserialized from a dict (enables cfg round-trip). Co-Authored-By: Claude <noreply@anthropic.com>
Adds docs/source/resources/robot/ur_robot.md and registers it in resources/robot/index.rst. Adds a __main__ block to ur_robot.py that adds the robot to a sim and checks the to_dict round-trip. Co-Authored-By: Claude <noreply@anthropic.com>
matafela
reviewed
Jun 26, 2026
| ) | ||
|
|
||
| self.attrs = RigidBodyAttributesCfg( | ||
| mass=1.0, |
Collaborator
There was a problem hiding this comment.
1.0 kg can be too heavy for links near robot flange. Should we use 0.1 kg or just use mass from urdf link inertia tag?
Contributor
Author
There was a problem hiding this comment.
Actually the mass will be ignored for asset loading (we set replace_inertia=False as default). I will remove it (and the other params that can be removed as well) directly from the config,
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
URRobotCfg— a singleRobotCfgsubclass covering the Universal Robots UR family (UR3, UR3e, UR5, UR5e, UR10, UR10e), selected viarobot_type. Built with the/add-robotskill on top of the unified robot protocol from #330.Design
robot_typepicks the URDF, joint-name casing, and per-variant drive defaults. The kinematic (DH) parameters are owned byURSolverCfg(its__post_init__already sets them perur_type); the robot config owns the URDF, control parts, drive properties, and rigid-body attributes.drive_pros.max_effortis sized per variant (UR3/UR3e ≈ 56 N·m, UR5/UR5e ≈ 150 N·m, UR10/UR10e ≈ 330 N·m; sim defaults, not factory specs).joint1–joint6while every other variant usesJoint1–Joint6;_build_defaultsselects the correct casing perrobot_type.from_dict, variant-aware_build_defaults,build_pk_serial_chainrouted through_pk_urdf_path, inheritedto_dict/save_to_file(round-trips).Prerequisite fix
URSolverCfgdid not setclass_type(it inherited"BaseSolver"fromSolverCfg), sofrom_dictround-tripping looked up a nonexistentBaseSolverCfgand failed. Addedclass_type: str = "URSolver"(matches theOPWSolverCfg/SRSSolverCfgpattern). This was a latent bug —URSolverCfgcould not be deserialized from a dict before. The existing UR solver IK tests still pass.Docs
docs/source/resources/robot/ur_robot.md+ registered inresources/robot/index.rst.__main__smoke test inur_robot.py(add to sim + round-trip check).Dependencies
RobotCfgprotocol:_build_defaultshook,merge_robot_cfgvariant-key filtering, inheritedto_dict). This PR targetsfeat/robot-unified-protocol; once Unify robot config protocol + add-robot skill #330 merges, it can be retargeted tomain.Dependencies: none beyond #330.
Type of change
Screenshots
N/A.
Checklist
black .command to format the code base.ur_robot.md+ index entry).tests/sim/objects/test_robot_cfg.py: 6×from_dictper variant, 6× round-trip, 6× DOF drift guard, default-type, max-effort-scales-with-size, unknown-type-raises — 21 UR tests; 28 cfg tests total green). Sim smoke: UR3/UR5/UR10 load intoSimulationManagerwith 6-DOF arm. Existing UR solver IK tests unaffected.