Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions docker/Dockerfile.gr00t_server

This file was deleted.

248 changes: 0 additions & 248 deletions docker/run_gr00t_server.sh

This file was deleted.

8 changes: 0 additions & 8 deletions isaaclab_arena/evaluation/policy_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,10 @@ def main():
# Each rank prints its own metrics as it can be different due to random seed
print(f"[Rank {local_rank}/{world_size}] Metrics: {metrics}")

# NOTE(huikang, 2025-12-30)Explicitly clean up the remote policy client / server.
# Do NOT rely on a __del__ destructor in policy for this, since destructors are
# triggered implicitly and their execution time (or even whether they run)
# is not guaranteed, which makes resource cleanup unreliable.
if policy.is_remote:
policy.shutdown_remote(kill_server=args_cli.remote_kill_on_exit)

# Close the environment.
env.close()


if __name__ == "__main__":
# TODO(xinjie.yao, 2026.03.31): Remove it after policy sever-client is implemented properly in v0.3.
ensure_groot_deps_in_path()
main()
4 changes: 2 additions & 2 deletions isaaclab_arena/policy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# SPDX-License-Identifier: Apache-2.0

from .action_chunking import ActionChunkingState
from .action_chunking_client import *
from .action_scheduler import ActionScheduler
from .action_chunking import ActionChunkScheduler, ActionChunkingState
from .replay_action_policy import *
from .rsl_rl_action_policy import *
from .zero_action_policy import *
18 changes: 12 additions & 6 deletions isaaclab_arena/policy/action_chunking.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
#
# SPDX-License-Identifier: Apache-2.0

"""Shared action chunking state and logic for local and remote policies."""
"""ActionChunkScheduler: buffer a model chunk and step through it sequentially."""

from __future__ import annotations

import torch
from collections.abc import Callable

from isaaclab_arena.policy.action_scheduler import ActionScheduler

class ActionChunkingState:
"""Holds chunk buffer, per-env index, and refill flag; provides get_action(fetch_chunk_fn).

Used by both Gr00tClosedloopPolicy (local) and ActionChunkingClientSidePolicy (remote)
so chunking behavior is identical.
class ActionChunkScheduler(ActionScheduler):
"""Buffers one action chunk and replays it one step at a time.

Fetches a new chunk from the model only when the current one is exhausted.
Per-env tracking allows environments to refetch independently.
"""

def __init__(
Expand Down Expand Up @@ -79,10 +81,14 @@ def get_action(self, fetch_chunk_fn: Callable[[], torch.Tensor]) -> torch.Tensor

return action

def reset(self, env_ids: torch.Tensor | None = None) -> None:
def reset(self, env_ids: torch.Tensor | slice | None = None) -> None:
"""Reset chunking state for the given envs (all if None)."""
if env_ids is None:
env_ids = slice(None)
self.current_action_chunk[env_ids] = 0.0
self.current_action_index[env_ids] = -1
self.env_requires_new_chunk[env_ids] = True


# Backwards-compatibility alias
ActionChunkingState = ActionChunkScheduler
Loading
Loading