Skip to content
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

Feature/enable specify entity type in autosink #1443

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

hakuturu583
Copy link
Collaborator

@hakuturu583 hakuturu583 commented Nov 8, 2024

Description

Abstract

Enabled selection of Entity to be Sinked in TrafficSink.

Background

In TrafficSink, arbitrary Entity was despawned when it approached TrafficSink, so there were cases where EgoEntity was despawned and testing could not continue.

Details

To enable this feature, set auto_sink, a member of traffic_simulator::Configuration structure, to true, and set std::set<traffic_simulator::EntityType, traffic_ simulator::EntityTypeComparator> to specify the target EntityType of the entity to be despawned.

e.g

auto configuration = traffic_simulator::Configuration(map_path);
configuration.auto_sink = true;
configuration.sinkable_entity_type = {traffic_simulator::EntityType::VEHICLE}

References

N/A

Destructive Changes

N/A

Known Limitations

Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Copy link

github-actions bot commented Nov 8, 2024

Checklist for reviewers ☑️

All references to "You" in the following text refer to the code reviewer.

  • Is this pull request written in a way that is easy to read from a third-party perspective?
  • Is there sufficient information (background, purpose, specification, algorithm description, list of disruptive changes, and migration guide) in the description of this pull request?
  • If this pull request contains a destructive change, does this pull request contain the migration guide?
  • Labels of this pull request are valid?
  • All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
  • The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.

Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
@hakuturu583 hakuturu583 self-assigned this Nov 11, 2024
@hakuturu583 hakuturu583 added wait for regression test bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 labels Nov 11, 2024
@hakuturu583 hakuturu583 marked this pull request as ready for review November 12, 2024 01:31
@@ -33,6 +35,8 @@ struct Configuration

bool auto_sink = true;

std::set<traffic_simulator::EntityType, EntityTypeComparator> sinkable_entity_type = {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding a less generic type like EntityTypeComparator, change it to add comparison operator overloads to EntityType.

Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Signed-off-by: Masaya Kataoka <ms.kataoka@gmail.com>
Copy link

sonarcloud bot commented Nov 13, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 wait for regression test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants