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
.
Possible Implementation:
- Besides
NodeStatus
, adding the new states and transitions defined in the standard withinosc1-engine/yase
. Alternatively, could also consider replacingNodeStatus
with a more comprehensiveStates
structure. - Introduce
set()
andget()
methods for states and transitions to allow updates, potentially within an overriddentick()
method. - Store a
shared_pointer
to theRootNode
orStoryBoardNode
in the blackboard. - Within
StoryBoardElementStateCondition
:- Locate and store the required node (e.g., an action node named
"action"
) by retrieving it from theRootNode
orStoryBoardNode
via the blackboard. - In the
IsSatisfied
function, query the node’s states or transitions to determine the condition's fulfillment.
- Locate and store the required node (e.g., an action node named