Skip to content

fix: defer triggered actions until after activation frame - #8

Draft
thomassedlmayer wants to merge 1 commit into
mainfrom
fix/pending-actions
Draft

thomassedlmayer wants to merge 1 commit into
mainfrom
fix/pending-actions

Conversation

@thomassedlmayer

Copy link
Copy Markdown
Collaborator

This changes storyboard event handling so triggered actions are queued instead of being applied in the same frame that activates their start condition. The activation frame now remains unchanged, and action effects become visible in a following simulation step.

The current "immediate application" concept surfaced an exceeded MAE tolerance only for the falling-edge speed trigger validation case. I think this issue didn't appear for other similar test cases because the extra 1-frame lag between reference and tool trajectory accidentally didn't exceed the error tolerances while it did for the falling-edge case.

Scheduling options:

  • Immediate application
    • Trigger fires at t.
    • Trajectory is attached at t.
    • First vertex can be visible at t.
  • Apply pending actions after _advance()
    • Trigger fires at t.
    • Frame t stays unchanged.
    • Trajectory is attached at t + dt.
    • First vertex becomes visible around t + 2dt.
  • Apply pending actions before _advance()
    • Trigger fires at t.
    • Frame t stays unchanged.
    • Trajectory is attached before advancing to t + dt.
    • Trajectory motion is visible at t + dt, but leading vertices may be skipped (depending on frame rate).

It would also be reasonable to increase the tolerated alignment lag from 1 to 2 in the corresponding test cases. With that, any scenario engine using "immediate application" would be tolerated by the validation suite.

Signed-off-by: Thomas Sedlmayer <tsedlmayer@pmsfit.de>
@thomassedlmayer
thomassedlmayer requested a review from pmai July 14, 2026 13:49
@thomassedlmayer
thomassedlmayer marked this pull request as draft July 14, 2026 14:11
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