-
Notifications
You must be signed in to change notification settings - Fork 722
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
Adds a script for recording training data from a Gym simulation and replaying in sim #437
Open
samzapo
wants to merge
28
commits into
huggingface:main
Choose a base branch
from
samzapo:record_gym_script
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,641
−666
Conversation
This file contains 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
use simulator timestamp, if available; integrate timestep from fps otherwise. Fixed timestep tolerance
Cadene
reviewed
Sep 12, 2024
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 for this PR :)
Closing to re-purpose as a teleoperation in sim script. Will re-open once new feature is in-place. |
…tart, control with arrows, hit END. Look in {'data_traces/0/myrepo', 'data_traces/1/myrepo'} for videos
… stats if num-workers>1.
samzapo
changed the title
Adds an example script for recording training data from a Gym simulation
Adds a script for recording training data from a Gym simulation and replaying in sim
Sep 18, 2024
Additional code clean-up
leader arm tele-op now supported: PXL_20241002_155344954.2.mp4 |
…r contact and cube models
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.
What this does
Adds a script (
lerobot/scripts/record_and_replay_teleop_dataset.py
) that:gym-drake-lca
, but may be others (e.g. gym-aloha, gym-lowcostrobot, gym-drake-lca)How it was tested
The default arguments will run 2 episodes of 20 steps each in the
PickPlaceCube-v0
environment fromgym_drake_lca
module and then upload them to HF dataset hub.Examples:
This script can be tested with poetry using command:
How to checkout & try? (for the reviewer)
Open your browser to: http://localhost:7000/ for visualization.
run:
Control with arrows, to end recording hit END.
Look in 'data_traces/{1,2,3}/' for videos
note, the transparent black cube is the pick and place target:
The following videos should result:
In "data_traces/1//videos" recordings of the teleop session with a red block.
In "data_traces/2//videos" recordings of a replay of session 1 (from disk) with a green block.
In "data_traces/3//videos" recordings of a replay of session 1 (from program memory) with a blue block.
The example uses the low-cost robot arm single-cube examples
Other robot deployments, e.g.
env-aloha
, pack all image observations into one observationdict
item. In consequence, this example can't be used directly, but can be used as boilerplate for those scripts.