Skip to content

Truncate motion tracking episodes when reference clip ends - #1351

Closed
M-Colley wants to merge 1 commit into
mujocolab:mainfrom
M-Colley:fix/tracking-motion-timeout-truncation
Closed

M-Colley wants to merge 1 commit into
mujocolab:mainfrom
M-Colley:fix/tracking-motion-timeout-truncation

Conversation

@M-Colley

Copy link
Copy Markdown
Contributor

When \MotionCommand\ reached \ ime_step_total\ without an explicit episode timeout, _update_command\ resampled and teleported the robot to a new RSI frame while \dones\ and \ ime_outs\ stayed \False. RSL-RL then bootstrapped value targets across unrelated episode boundaries, leaked GAE traces across the teleport, and skipped resetting recurrent hidden states and observation histories.

This adds a \motion_time_out\ termination term wired with \ ime_out=True\ in \make_tracking_env_cfg\ so reaching the final reference frame cleanly truncates the episode while preserving \MotionCommand\ wraparound when terminations are disabled (such as \play --no-terminations). It also clears \ ime_outs\ in \TerminationManager.compute\ when a non-timeout failure fires on the same step so failed terminal states are never bootstrapped, clamps uniform RSI sampling below \ ime_step_total - 1\ to match adaptive sampling, and holds done envs at the final frame when \�uto_reset=False.

Fixes #1106

When MotionCommand reached time_step_total without an explicit episode timeout, _update_command resampled and teleported the robot to a new RSI frame while dones and time_outs stayed False. RSL-RL then bootstrapped value targets across unrelated episode boundaries, leaked GAE traces across the teleport, and skipped resetting recurrent hidden states and observation histories.

Add a motion_time_out termination term wired with time_out=True in make_tracking_env_cfg so reaching the final frame cleanly truncates the episode while preserving MotionCommand wraparound when terminations are disabled (such as play --no-terminations). Also clear time_outs in TerminationManager.compute when a non-timeout termination fires on the same step so simultaneous failures are not bootstrapped, clamp uniform RSI sampling below time_step_total - 1 to match adaptive sampling, and hold done envs at the final frame when auto_reset=False.

Fixes mujocolab#1106
@kevinzakka kevinzakka closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect TD target when tracking episodes reset in MotionCommand

2 participants