Commit de799311 authored by peterd-NV's avatar peterd-NV Committed by Kelly Guo

Fixes mimic bugs and documentation enhancements (#326)

Bug fixes and enhancements to Mimic.
Changes include:

- Fix bug that causes infinite looping of unsuccessful demos in
annotation script.
- Add auto reset event to pick place GR1 env when rod is dropped off
table
- Update pick place GR1 env task success criteria to be more precise
- Update Mimic docs to use CPU for GR1 teleop for better XR performance
due to running single env

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)
- Documentation update
- Environment enhancement

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
parent a38c7e45
......@@ -325,18 +325,25 @@ Optional: Collect and annotate demonstrations
A pre-recorded annotated dataset is provided in the next step .
Set up the CloudXR Runtime and Apple Vision Pro for teleoperation by following the steps in :ref:`cloudxr-teleoperation`.
CPU simulation is used in the following steps for better XR performance when running a single environment.
Collect a set of human demonstrations using the command below. We recommend 10 successful demonstrations for good data generation results.
Collect a set of human demonstrations using the command below.
A success demo requires the object to be placed in the bin and for the robot's right arm to be retracted to the starting position.
We recommend 10 successful demonstrations for good data generation results.
.. code:: bash
./isaaclab.sh -p scripts/tools/record_demos.py \
--device cuda \
--device cpu \
--task Isaac-PickPlace-GR1T2-Abs-v0 \
--teleop_device dualhandtracking_abs \
--dataset_file ./datasets/dataset_gr1.hdf5 \
--num_demos 10 --enable_pinocchio
.. note::
If a demo fails during data collection, the environment can be reset using the teleoperation controls panel in the XR teleop client
on the Apple Vision Pro or via voice control by saying "reset". See :ref:`teleoperate-apple-vision-pro` for more details.
Unlike the prior Franka stacking task, the GR-1 pick and place task uses manual annotation to define subtasks.
Each demo requires a single annotation which denotes when the right robot arm finishes the "idle" subtask and begins to
move towards the target object. Annotate the demonstrations by running the following command:
......@@ -344,7 +351,7 @@ move towards the target object. Annotate the demonstrations by running the follo
.. code:: bash
./isaaclab.sh -p scripts/imitation_learning/isaaclab_mimic/annotate_demos.py \
--device cuda \
--device cpu \
--task Isaac-PickPlace-GR1T2-Abs-Mimic-v0 \
--input_file ./datasets/dataset_gr1.hdf5 \
--output_file ./datasets/dataset_annotated_gr1.hdf5 --enable_pinocchio
......
......@@ -416,6 +416,7 @@ def annotate_episode_in_manual_mode(
if not task_success_result:
print("\tThe final task was not completed.")
return False
if expected_subtask_signal_count != len(marked_subtask_action_indices):
print(
......
......@@ -94,6 +94,7 @@ if args_cli.enable_pinocchio:
import isaaclab_tasks.manager_based.manipulation.pick_place # noqa: F401
from isaaclab.devices.openxr.retargeters.manipulator import GripperRetargeter, Se3AbsRetargeter, Se3RelRetargeter
from isaaclab.envs.mdp.recorders.recorders_cfg import ActionStateRecorderManagerCfg
from isaaclab.managers import DatasetExportMode
import isaaclab_tasks # noqa: F401
from isaaclab_tasks.utils.parse_cfg import parse_env_cfg
......@@ -219,6 +220,7 @@ def main():
env_cfg.recorders: ActionStateRecorderManagerCfg = ActionStateRecorderManagerCfg()
env_cfg.recorders.dataset_export_dir_path = output_dir
env_cfg.recorders.dataset_filename = output_file_name
env_cfg.recorders.dataset_export_mode = DatasetExportMode.EXPORT_SUCCEEDED_ONLY
# create environment
env = gym.make(args_cli.task, cfg=env_cfg).unwrapped
......
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.10.29"
version = "0.10.30"
# Description
title = "Isaac Lab Environments"
......
Changelog
---------
0.10.29 (2025-03-25)
0.10.30 (2025-03-25)
~~~~~~~~~~~~~~~~~~~~
Fixed
......@@ -10,7 +10,7 @@ Fixed
* Fixed environment test failure for ``Isaac-Stack-Cube-Franka-IK-Rel-Blueprint-v0``.
0.10.28 (2025-03-18)
0.10.29 (2025-03-18)
~~~~~~~~~~~~~~~~~~~~
Added
......@@ -19,6 +19,16 @@ Added
* Added Gymnasium spaces showcase tasks (``Isaac-Cartpole-Showcase-*-Direct-v0``, and ``Isaac-Cartpole-Camera-Showcase-*-Direct-v0``).
0.10.28 (2025-03-19)
~~~~~~~~~~~~~~~~~~~~
Changed
^^^^^^^
* Updated the ``Isaac-PickPlace-GR1T2-Abs-v0`` environment with auto termination when the object falls off the table
and refined the success criteria to be more accurate.
0.10.27 (2025-03-13)
~~~~~~~~~~~~~~~~~~~~
......
......@@ -24,13 +24,13 @@ if TYPE_CHECKING:
def task_done(
env: ManagerBasedRLEnv,
object_cfg: SceneEntityCfg = SceneEntityCfg("object"),
right_wrist_max_x: float = 0.23,
min_x: float = 0.40,
max_x: float = 1.1,
min_y: float = 0.3,
max_y: float = 0.6,
right_wrist_max_x: float = 0.26,
min_x: float = 0.30,
max_x: float = 0.95,
min_y: float = 0.25,
max_y: float = 0.66,
min_height: float = 1.13,
min_vel: float = 0.08,
min_vel: float = 0.20,
) -> torch.Tensor:
"""Determine if the object placement task is complete.
......
......@@ -286,6 +286,11 @@ class TerminationsCfg:
"""Termination terms for the MDP."""
time_out = DoneTerm(func=mdp.time_out, time_out=True)
object_dropping = DoneTerm(
func=mdp.root_height_below_minimum, params={"minimum_height": 0.5, "asset_cfg": SceneEntityCfg("object")}
)
success = DoneTerm(func=mdp.task_done)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment