-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EntitySelection
#1059
Merged
Merged
Add EntitySelection
#1059
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…/entity_selection
…/entity_selection
…/entity_selection
….com/tier4/scenario_simulator_v2 into feature/interpreter/entity_selection
shouth
added
bump minor
If this pull request merged, bump minor version of the scenario_simulator_v2
and removed
bump patch
If this pull request merged, bump patch version of the scenario_simulator_v2
labels
Feb 21, 2024
…/entity_selection
…/entity_selection
…/refactoring_entity
…rpreter/refactoring_entity
…/entity_selection
…rpreter/refactoring_entity
…/entity_selection
yamacir-kit
approved these changes
Jul 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Abstract
EntitySelection
EntitySelection
EntitySelection
Background
OpenSCENARIO has the concept called
Entity
.Entity
may be represented by either a singleScenarioObject
, aEntitySelection
orSpawnedObject
. This PR enables scenario_simulator_v2 to handleEntitySelection
in addtion toScenarioObject
which has been already supported. By usingEntitySelection
, scenario writers can group multiple entities and apply actions/conditions to the group.Details
EntitySelection
EntitySelection
describes a list ofEntity
by specifing names or entity types. Entities selected byEntitySelection
is collected when users ofEntitySelection
needs them.Entity
In a scenario, participants are called
Entity
. Existing implementation assumes each names in a scenario corresponds to a single entity, but this assumption is broken by introduction ofEntitySelection
. This PR addsEntity
class to handle this issue.Entity
class resolves actual entity instance from entity reference on construction.Members resolved only to ScenarioObjects:
RelativeDistanceCondition::entity_ref
RelativeObjectPosition::entity_ref
RelativeTargetLane::entity_ref
RelativeTargetSpeed::entity_ref
RelativeWorldPosition::entity_ref
RelativeProfileAction::entity_ref
SpeedProfileAction::entity_ref
TimeHeadwayCondition::entity_ref
CollisionCondition::another_given_entity
Members resolved to EntitySelection as well:
Scope::actors
Private.entityRef
andActors.entityRefs
EntityAction::entity_ref
TriggeringEntities::entity_refs
Classes affected by above changes:
Scope::actors
AcquirePositionAction
AssignRouteAction
ControllerAction
ApplyWalkStraightAction
FollowTrajectoryAction
LaneChangeAction
SpeedAction
SpeedProfileAction
TeleportAction
TriggeringEntities::entity_refs
AccelerationCondition
CollisionCondition
DistanceCondition
ReachPositionCondition
RelativeDistanceCondition
SpeedCondition
StandStillCondition
TimeHeadwayCondition
scenarios
This PR contains several scenarios for testing
EntitySelection
. Approximately 1,000 lines of the changes contained in this PR are due to these scenarios.Subsequent changes
N/A
References
https://www.asam.net/index.php?eID=dumpFile&t=f&f=4908&token=ae9d9b44ab9257e817072a653b5d5e98ee0babf8#_entities
Destructive Changes
I added checks on constraints of entities. For more details, see OpenSCENARIO 1.2 Annex B. Scenarios that contradict to OpenSCENARIO 1.2 Annex B will break if this PR is merged (I think it is rare case).
Known Limitations
N/A