Ego Subsystem - woven-planet/opensafety-mbse GitHub Wiki
The Ego Subsystem models both the Ego Vehicle's general context (is it on the road or is it in a parking lot?) as well as the dynamic relationships necessary to characterize a specific maneuver.
General context
How do we establish the difference between an Ego Vehicle that is on the road vs. off-road? By formalizing relationships to certain elements defined in the Road Subsystem! For example, an Ego Vehicle on a Road (relationship R150) is, by definition, an On Road Ego Vehicle. If it is in a Driving Lane (relationship R151) it is defined as a Traveling Ego Vehicle with an Active Driving Lane.
High level maneuver
When the Ego Vehicle performs a high level maneuver, such as a lane change or an intersection approach (or even both simultaneously), it develops additional relationships with elements in the immediate driving environment. In the case of a lane change, these elements happen to be defined in the Road Subsystem.
For example, our Traveling Ego Vehicle is assigned a target Driving Lane (relationship R157). This relationship is manifested as the Multi Lane Maneuver class. An instance of this class comes into existence and then executes each necessary Driving Lane Change until either the target is attained, in which case the target lane becomes the new Active Driving Lane, or it fails in one of numerous scenarios. In either case, the Multi Lane Maneuver instance terminates (deletes itself) upon completion.
Since the Ego Vehicle is typically in motion, it is continually developing relationships in this manner. Note however, that the avialable relationships depend entirely on the immediate driving environment.
Early release scope
In this early release of our driving environment models, the Multi Lane Change Maneuver is the only available behavior. But stay tuned, since signalized intersection traversal is coming up next!
Subsystem Workbook
Both the class and state models are condensed in the Ego Subsystem Workbook.
For quick reference and easy browsing, we have included links to the class model elements below.
Class Model
tri.guidance.ego.td.1a / Leon Starr / Version 1.6.0 / 2021-4-15
Subsystem range: 150-199 (for numbering relationships on class diagram)
Class Diagram
Class descriptions
- Active Driving Lane
- Driving Lane Change
- Ego Vehicle
- Lane Change Behavior Specification
- Multi Lane Maneuver
- Non Traveling Ego Vehicle
- On Road Ego Vehicle
- Personality
Relationship descriptions
Class Collaboration Diagram
The Ego Subsystem Class Collaboration Diagram shows how the driving lane change and multi lane change maneuver state models are coordinated. We characterize this particular diagram as a view rather than a model proper since it is derived from the underlying models and not used for code generation.
Nonetheless, we find it indispensable for both planning the interactions as well as making them easier to understand at a glance. From here you can dive deeper into the referenced state models and class methods all of which is in the Ego Subsystem Workbook. Below we link the individual state models.
State Models
Each state model consists of a diagram and a table capturing the lifecycle of some Ego Subsystem Class. (At this point the dynamic behavior of only two have been modeled: Driving Lane Change and Multi Lane Maneuver). In fact, the table is the complete model and it is what we use to generate code. But the diagram is useful for understanding the relevant class lifecycle.
Driving Lane Change State Machine Diagram
Driving Lane Change State Table
Multi Lane Maneuver State Machine Diagram
Multi Lane Maneuver State Table
Example Scenarios as Sequence Diagrams
Here we populate the Road Subsystem with a sample road/lane structure and place the Ego Vehicle within the environment. The scenario is initiated with an event that triggers a multi lane change maneuver. As time proceeds from top to bottom of each diagram, we see each state that is entered synchronized among the participating state machines.