Skip to content

Commit 084e9d9

Browse files
StafaHisaaclab-bot[bot]
authored andcommitted
[Workflow] Report when playback agents are running (#7560)
# Description Adds a terminal status message after playback initialization completes so users know the process is actively running and how to stop it. The message is customized for: - trained policy playback across RL-Games, RSL-RL, Stable-Baselines3, skrl, and RLinf - the zero agent - the random agent ## Type of change - New feature (non-breaking change which adds functionality) ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Not applicable; this change affects terminal output only. ## Validation - `uv run python -m pytest source/isaaclab_rl/test/test_entrypoints.py` (32 passed) - `SKIP=check-changelog-fragments uv run isaaclab -f` (all applicable formatting and lint checks passed) - Changelog validation against upstream `develop` (passed) ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit formatting and lint checks - [x] Documentation changes are not required for this terminal-only behavior - [x] My changes generate no new warnings - [x] No new test is needed for static terminal text; the existing entrypoint suite passes - [x] I have added a changelog fragment for `isaaclab_rl` - [x] My name already exists in `CONTRIBUTORS.md` (cherry picked from commit 6b8e133)
1 parent 51642ea commit 084e9d9

7 files changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Added
2+
^^^^^
3+
4+
* Added mode-specific terminal messages when policy playback, the zero-action agent, or the random-action agent
5+
finished initialization.

source/isaaclab_rl/isaaclab_rl/entrypoints/backends/play_rl_games.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ def main():
199199
_ = agent.get_batch_size(obs, 1)
200200
if agent.is_rnn:
201201
agent.init_rnn()
202+
print("[INFO] Policy playback is running, press Ctrl+C to exit...")
202203
try:
203204
while True:
204205
start_time = time.time()

source/isaaclab_rl/isaaclab_rl/entrypoints/backends/play_rlinf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ def main():
161161
)
162162

163163
runner.init_workers()
164+
print("[INFO] Policy playback is running, press Ctrl+C to exit...")
164165
runner.run()
165166

166167

source/isaaclab_rl/isaaclab_rl/entrypoints/backends/play_rsl_rl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def main(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvCfg, agen
218218
screen.close()
219219
obs = env.get_observations()
220220
timestep = 0
221+
print("[INFO] Policy playback is running, press Ctrl+C to exit...")
221222
try:
222223
while True:
223224
start_time = time.time()

source/isaaclab_rl/isaaclab_rl/entrypoints/backends/play_sb3.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def main():
187187
screen.close()
188188
obs = env.reset()
189189
timestep = 0
190+
print("[INFO] Policy playback is running, press Ctrl+C to exit...")
190191
try:
191192
while True:
192193
start_time = time.time()

source/isaaclab_rl/isaaclab_rl/entrypoints/backends/play_skrl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def _main():
242242
obs, _ = env.reset()
243243
states = env.state()
244244
timestep = 0
245+
print("[INFO] Policy playback is running, press Ctrl+C to exit...")
245246
try:
246247
while True:
247248
start_time = time.time()

source/isaaclab_rl/isaaclab_rl/entrypoints/simple_agents.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ def run(argv: list[str] | None = None, *, policy: PolicyName) -> None:
8585
# reset environment
8686
env.reset()
8787
zero_action_policy = _create_zero_action_policy(env) if policy == "zero" else None
88+
if policy == "zero":
89+
print("[INFO] Zero agent is running, press Ctrl+C to exit...")
90+
else:
91+
print("[INFO] Random agent is running, press Ctrl+C to exit...")
8892
# simulate environment
8993
# keep running while any visualizer is open, and until the step budget is exhausted
9094
sim = env.unwrapped.sim

0 commit comments

Comments
 (0)