diff --git a/examples/siro_sandbox/app_states/app_state_tutorial.py b/examples/siro_sandbox/app_states/app_state_tutorial.py index 8d21fcd7be..a8cc3d8644 100644 --- a/examples/siro_sandbox/app_states/app_state_tutorial.py +++ b/examples/siro_sandbox/app_states/app_state_tutorial.py @@ -63,6 +63,10 @@ def _sim_update_tutorial(self, dt: float): if self._sandbox_service.gui_input.get_key_down(GuiInput.KeyNS.SPACE): self._tutorial.skip_stage() + if self._sandbox_service.gui_input.get_key_down(GuiInput.KeyNS.Q): + while not self._tutorial.is_completed(): + self._tutorial.skip_stage() + if self._tutorial.is_completed(): self._tutorial.stop_animations() else: diff --git a/examples/siro_sandbox/hitl_tutorial.py b/examples/siro_sandbox/hitl_tutorial.py index 2d1a517997..885d1e455f 100644 --- a/examples/siro_sandbox/hitl_tutorial.py +++ b/examples/siro_sandbox/hitl_tutorial.py @@ -30,8 +30,8 @@ TEXT_ROBOT_FOCUS: str = ( "This is your robot assistant.\nIt will help you accomplish your tasks.\n" ) -TEXT_AVATAR_FOCUS: str = "This is your avatar.\nYou will now gain control." -TEXT_HELP: str = "Spacebar: Skip" +TEXT_AVATAR_FOCUS: str = "You will now gain control of your avatar." +TEXT_HELP: str = "Q: Skip \nSpacebar: Skip to the next stage of the tutorial" class ObjectAnimation: diff --git a/examples/siro_sandbox/sandbox_app.py b/examples/siro_sandbox/sandbox_app.py index f044024c3f..c78c4ff8be 100644 --- a/examples/siro_sandbox/sandbox_app.py +++ b/examples/siro_sandbox/sandbox_app.py @@ -372,6 +372,14 @@ def _reset_environment(self): self._app_state_index = ( 0 # start from the first app state for each episode ) + # if short_tutorial enabled we show the tutorial only once - before the first episode + # (skip the first app state (tutorial) after the first episode) + if ( + self._args.show_tutorial + and self._args.short_tutorial + and self._episode_helper.num_episodes_done > 0 + ): + self._app_state_index = 1 self._app_state = self._app_states[self._app_state_index] self._app_state.on_enter( prev_state=self._get_prev_app_state(), @@ -710,6 +718,12 @@ def _parse_debug_third_person(args, framebuffer_size): default=False, help="Shows an intro sequence that helps familiarize the user to the scene and task in a HITL context.", ) + parser.add_argument( + "--short-tutorial", + action="store_true", + default=False, + help="Shows an intro sequence that helps familiarize the user to the scene and task in a HITL context, ONLY for 1 episode. Requires --show-tutorial arguement to be specified as well.", + ) parser.add_argument( "--hide-humanoid-in-gui", action="store_true",