Skip to content

Support for StoryBoardElementStateCondition

Overview:
We aim to support the StoryBoardElementStateCondition. However, there appears to be a gap between the standard definition and the node status defined in the engine.

Feature Definition:
Simply put, the condition’s satisfaction depends on the states of storyboard elements. For a detailed definition, could refer to the official documentation:
ASAM OpenSCENARIO - StoryBoardElementStateCondition

Possible Use Case:
This condition can help bridge gaps in some scenarios by making it easier to define start and stop triggers based on other storyboard elements.

For example, in a scenario with two vehicles—each in its own lane—one vehicle starts a cut-in maneuver. The other vehicle would like to begin decelerating once the cut-in action starts. Then the deceleration action’s start trigger should depend on the "StartTransition" of the cut-in action.

Challenges:
Currently, necessary states and transitions are missing in osc1-engine/yase. The existing NodeStatus only includes Success, Failure, Running, and Idle, which do not fully cover the requirements for StoryBoardElementStateCondition.

image.png

Possible Implementation:

  • Besides NodeStatus , adding the new states and transitions defined in the standard within osc1-engine/yase. Alternatively, could also consider replacing NodeStatus with a more comprehensive States structure.
  • Introduce set() and get() methods for states and transitions to allow updates, potentially within an overridden tick() method.
  • Store a shared_pointer to the RootNode or StoryBoardNode in the blackboard.
  • Within StoryBoardElementStateCondition:
    • Locate and store the required node (e.g., an action node named "action") by retrieving it from the RootNode or StoryBoardNode via the blackboard.
    • In the IsSatisfied function, query the node’s states or transitions to determine the condition's fulfillment.
Edited by Ziqi Zhou