Skip to content

Fix delayed observable sampling timing - #823

Open
zjn20030811 wants to merge 1 commit into
ARISE-Initiative:masterfrom
zjn20030811:fix/observable-sampling-timing
Open

Fix delayed observable sampling timing#823
zjn20030811 wants to merge 1 commit into
ARISE-Initiative:masterfrom
zjn20030811:fix/observable-sampling-timing

Conversation

@zjn20030811

Copy link
Copy Markdown

What this does

  • fixes delayed observables sampling on the first simulator tick instead of at their scheduled offset
  • keeps forced refreshes outside the periodic sampling clock, so querying a freshly set simulation state does not consume a scheduled sample or redraw its delay
  • clears the sampled flag on reset
  • adds focused CPU regressions for zero-delay, delayed, forced, and reset behavior

This restores the intended sensor timing used by delayed observations in sim-to-real experiments.

How it was tested

  • python -m pytest tests/test_observables.py -q (4 passed)
  • python -m black --check robosuite/utils/observables.py tests/test_observables.py
  • python -m isort --check-only robosuite/utils/observables.py tests/test_observables.py

The regressions verify that a 100 ms observable with 30 ms delay samples at 70 ms, that a forced refresh preserves the current phase and sampled delay, and that reset starts a fresh sampling period.

How to checkout & try?

python -m pytest tests/test_observables.py -q

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.

1 participant