orbitalgym.policies.action_repeat¶
Wrapper that calls an inner Policy every repeat env steps and
re-emits its command in between. Pair it with
POMDPAdapter(env, action_repeat=repeat) so the trajectory the env
flies matches the one the planner searched. See
How-to → Use the POMDP adapter.
Policy state¶
orbitalgym.policies.action_repeat.ActionRepeatState ¶
Cached command, tick counter, and the inner policy's state.
step counts ticks since the wrapper was initialised. The inner
policy runs when step % repeat == 0 — so on the first tick — and
cached_dv holds the command replayed on every other tick.
Wrapper¶
orbitalgym.policies.action_repeat.ActionRepeatPolicy
dataclass
¶
Call inner every repeat env steps, replaying its command in between.
init_state ¶
init_state(
config: Any = None,
env_state: Any = None,
key: Array | None = None,
inner_init_state: Any = None,
) -> ActionRepeatState
Build the initial state with a zero cached command and the counter at 0.
The counter starts at 0, so the inner policy is called on the very
first tick and the zero cache is never emitted. inner_init_state
seeds the wrapped policy; when it is None the inner policy's own
zero-argument init_state is used if it has one.