Skip to content

Commit 2261210

Browse files
committed
Replay supports ee transform
1 parent 15ed64c commit 2261210

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

isaaclab_arena/scripts/imitation_learning/record_demos.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@
5656
default=False,
5757
help="Enable Pinocchio.",
5858
)
59+
parser.add_argument(
60+
"--use_world_frame_actions",
61+
action="store_true",
62+
default=False,
63+
help=(
64+
"Use world frame actions for recording. This is automatically enabled when using "
65+
"motion_controllers or openxr teleop devices, but can be explicitly set if needed."
66+
),
67+
)
5968

6069
# Add the example environments CLI args
6170
# NOTE(alexmillane, 2025.09.04): This has to be added last, because

isaaclab_arena/scripts/imitation_learning/replay_demos.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@
4242
default=False,
4343
help="Enable Pinocchio.",
4444
)
45+
parser.add_argument(
46+
"--use_world_frame_actions",
47+
action="store_true",
48+
default=False,
49+
help=(
50+
"Use world frame actions for replay. Set this to True when replaying demos recorded with "
51+
"motion controllers or other VR devices that output world-space poses."
52+
),
53+
)
4554

4655
# Add the example environments CLI args
4756
# NOTE(alexmillane, 2025.09.04): This has to be added last, because

isaaclab_arena/scripts/imitation_learning/teleop.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
default=False,
3030
help="Enable Pinocchio.",
3131
)
32+
parser.add_argument(
33+
"--use_world_frame_actions",
34+
action="store_true",
35+
default=False,
36+
help=(
37+
"Use world frame actions for teleoperation. This is automatically enabled when using "
38+
"motion_controllers or openxr teleop devices, but can be explicitly set if needed."
39+
),
40+
)
3241

3342
# Add the example environments CLI args
3443
# NOTE(alexmillane, 2025.09.04): This has to be added last, because

isaaclab_arena_environments/galileo_g1_locomanip_pick_and_place_environment.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@ def get_env(self, args_cli: argparse.Namespace):
2323
blue_sorting_bin = self.asset_registry.get_asset_by_name("blue_sorting_bin")()
2424

2525
# Check if we need world frame actions (for VR/motion controllers)
26-
use_world_frame_actions = (
27-
args_cli.teleop_device in ["motion_controllers", "openxr"]
28-
and args_cli.embodiment == "g1_wbc_pink"
29-
)
26+
# This can be set via:
27+
# 1. --use_world_frame_actions flag (for replay)
28+
# 2. Using motion_controllers/openxr teleop device (for recording/teleop)
29+
use_world_frame_actions = False
30+
if hasattr(args_cli, 'use_world_frame_actions') and args_cli.use_world_frame_actions:
31+
use_world_frame_actions = True
32+
elif hasattr(args_cli, 'teleop_device') and args_cli.teleop_device in ["motion_controllers", "openxr"]:
33+
use_world_frame_actions = True
34+
35+
# Only apply world frame actions for g1_wbc_pink embodiment
36+
use_world_frame_actions = use_world_frame_actions and args_cli.embodiment == "g1_wbc_pink"
3037

3138
# Create embodiment with appropriate action config
3239
if use_world_frame_actions:
@@ -62,6 +69,7 @@ def get_env(self, args_cli: argparse.Namespace):
6269
)
6370
embodiment.set_initial_pose(Pose(position_xyz=(0.0, 0.18, 0.0), rotation_wxyz=(1.0, 0.0, 0.0, 0.0)))
6471

72+
# Configure navigation for mimic use case
6573
if (
6674
args_cli.embodiment == "g1_wbc_pink"
6775
and hasattr(args_cli, "mimic")

0 commit comments

Comments
 (0)