Add articulation and robot joint limit APIs#359
Open
yuecideng wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends EmbodiChain’s simulation object layer by adding articulation-level joint limit getters/setters (position/velocity/effort) with DexSim-backed writes, and exposes matching robot APIs that support both control-part (name) selection and explicit joint_ids filtering while preserving prior precedence behavior.
Changes:
- Added
Articulation.get_*_limits(...)andArticulation.set_*_limits(...)APIs withenv_ids/joint_idsfiltering, input shape coercion, and cache updates. - Updated
Articulation.set_qpos(...)to clamp against per-environment joint position limits (instead of using a single env’s limits). - Added
Robotlimit getters/setters that supportjoint_ids, keep backward-compatiblenameprecedence, and are covered by new regression tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/sim/objects/test_robot.py | Adds regression tests validating Robot limit APIs for control parts, joint_ids, and setter precedence. |
| tests/sim/objects/test_articulation.py | Adds comprehensive tests for limit getter/setter filtering, cache synchronization, failure behavior, and qpos clamping. |
| embodichain/lab/sim/objects/robot.py | Introduces a shared joint-id resolution helper and adds Robot limit getters/setters delegating to Articulation. |
| embodichain/lab/sim/objects/articulation.py | Implements limit caching in ArticulationData, adds limit getter/setter APIs, and updates clamping/cache sync behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 adds articulation-level joint position, velocity, and effort limit getters plus DexSim-backed setters, and exposes matching robot APIs with backward-compatible
namehandling andjoint_idssupport.Motivation and context:
RobotandArticulationset_joint_limits,set_joint_velocity_limit, andset_joint_effort_limitDependencies: None.
Issue reference: N/A
Verification:
pytest tests/sim/objects/test_articulation.py tests/sim/objects/test_robot.py -q(62 passed)Type of change
Screenshots
N/A
Checklist
black.