-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Allow max_relative_target to be a float #1837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
pkooij
requested changes
Sep 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left only one small comment
This was referenced Sep 3, 2025
pkooij
approved these changes
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
BillmanH
pushed a commit
to BillmanH/lerobot
that referenced
this pull request
Sep 7, 2025
* Remove unused max_relative_target for stretch3 * Fix type annotation and allow integer max_relative_target values * Configure max_relative_target to be floats instead of ints * Update docs and types to reflect that max_relative_target can be a dict * Remove unnecessary isinstance check for ints * Fix typo in name --------- Co-authored-by: Justin Huang <justin.huang@jpl.nasa.gov>
manmohan659
pushed a commit
to manmohan659/lerobot
that referenced
this pull request
Sep 27, 2025
* Remove unused max_relative_target for stretch3 * Fix type annotation and allow integer max_relative_target values * Configure max_relative_target to be floats instead of ints * Update docs and types to reflect that max_relative_target can be a dict * Remove unnecessary isinstance check for ints * Fix typo in name --------- Co-authored-by: Justin Huang <justin.huang@jpl.nasa.gov>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
What this does
This PR updates the robot configurations so that
max_relative_targetcan be a float instead of just an integer.This PR also makes a couple of small related changes:
max_relative_target. Currently, it states that it can be a list of numbers, but the implementation ofensure_safe_goal_positiononly allowsmax_relative_targetto be a scalar or a dictionary.max_relative_targetfromStretch3RobotConfig.Stretch3Robotdoes not usemax_relative_target.ensure_safe_goal_position:dict[float]->dict[str, float].Fixes #1716 and fixes #1527.
How it was tested
I have an SO-101 and tested this change by running lerobot-teleoperate under 4 conditions:
--robot.max_relative_target 10--robot.max_relative_target 10.5--robot.max_relative_target '{"shoulder_pan":20.0,"shoulder_lift":20.0,"elbow_flex":20.0,"wrist_flex":20.0,"wrist_roll":20.0,"gripper":5.0}'--robot.max_relative_targetI ran all the existing tests. All tests passed except for policy-related tests which I believe are unrelated environment setup issues:
How to checkout & try? (for the reviewer)
I tested this using a basic teleop command:
Where
--robot.max_relative_targetwas set to one of the above.