Control simulated robot with real leader #514
Draft
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
control_sim_robot.py
inlerobot/scripts
that has the same functionality and interface ascontrol_robot.py
but for simulated environments.The script has three control modes:
--repo-id
option.The dataset created contains more columns related to reinforcement learning like
next.reward
,next.success
andseed
.Simulation environments
Along with the
--robot-path
argument, the scripts requires a path the configuration file of the simulation environment -- define inlerobot/configs/env
.Example of the configuration file for gym_lowcostrobot:
Essential elements:
How to test
First install the gym_lowcostrobot environment and add the environment's config file in
yaml
format.Test teleoperation:
Test data collection and upload to hub:
Replay the episodes:
In the script we save the
seed
in the dataset which enables us to reset the environment in the same state when the data collection was happening which makes the replay successful.Finally visualize the dataset:
TODO:
Test with more simulation environments, brax, maniskill, IsaacLab ...
Add keyboard control of the end-effector.
Note: You might need to run
mjpython
if you're using MAC.Note: The current script requires a real leader in order to teleoperate sim environments. We can add support for keyboard control of the end effector for people who don't have the real robot.