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/reset behavior plugin #1210

Merged
merged 16 commits into from
Mar 27, 2024
Merged

Conversation

hakuturu583
Copy link
Collaborator

@hakuturu583 hakuturu583 commented Mar 7, 2024

Description

Abstract

Enable reset behavior plugin of entity.

Background

Previously, no means was provided to reset the behavior plugin, and the state had to be saved and respawned.
This pull request provides functionality to allow plugins to be replaced more easily.

Details

Enable reset behavior plugin of entity.
You can use this feature by function below.

void API::resetBehaviorPlugin(const std::string & name, const std::string & behavior_plugin_name)

First argument is the name of the entity you want to reset behavior plugin.
Second argument is the name of the behavior plugin you want to set.

Internally, the following operations are performed

  1. Save entity state and parameters.
  2. Despawn and respawn target entity.
  3. Reset acceleration/twist/behavior parameters to the target entity.

References

Regression test result

Destructive Changes

N/A

Known Limitations

  • API::resetBehaviorPlugin function cannot be called on non-spawned Entity
  • API::resetBehaviorPlugin function cannot be called for entities other than vehicle/pedestrian because behavior plugin does not exist for entities other than vehicle/pedestrian.

@hakuturu583 hakuturu583 self-assigned this Mar 7, 2024
@hakuturu583 hakuturu583 added the bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 label Mar 7, 2024
Copy link

github-actions bot commented Mar 7, 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 <[email protected]>
Signed-off-by: Masaya Kataoka <[email protected]>
Signed-off-by: Masaya Kataoka <[email protected]>
@hakuturu583 hakuturu583 requested a review from yamacir-kit March 8, 2024 05:31
@hakuturu583 hakuturu583 marked this pull request as ready for review March 8, 2024 05:31
@hakuturu583 hakuturu583 marked this pull request as draft March 22, 2024 01:41
Signed-off-by: Masaya Kataoka <[email protected]>
Signed-off-by: Masaya Kataoka <[email protected]>
@hakuturu583 hakuturu583 marked this pull request as ready for review March 25, 2024 02:01
@yamacir-kit yamacir-kit merged commit 60e569d into master Mar 27, 2024
10 checks passed
@yamacir-kit yamacir-kit deleted the feature/reset_behavior_plugin branch March 27, 2024 01:08
@github-actions github-actions bot restored the feature/reset_behavior_plugin branch March 27, 2024 01:09
@github-actions github-actions bot deleted the feature/reset_behavior_plugin branch March 27, 2024 01:10
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