-
Notifications
You must be signed in to change notification settings - Fork 61
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
Refactor/simple sensor simulator/noise #1506
Merged
Merged
+75
−114
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
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
Checklist for reviewers ☑️All references to "You" in the following text refer to the code reviewer.
|
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
…sor_simulator/noise
Signed-off-by: yamacir-kit <httperror@404-notfound.jp>
|
HansRobo
approved these changes
Feb 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Refactored the function to add noise to messages published by
DetectionSensor
insimple_sensor_simulator
.Background
DetectionSensor currently provides a simple noise application. The feature can be configured in the items listed in LINK whose names begin with
detectedObject
.However, since this feature is only a simple noise application, a more practical noise model will be designed by Autoware's planner development team. The classes
DefaultNoiseApplicator
andCustomNoiseApplicator
have been prepared as a testing ground for the planner development team to test and validate the model.Details
The two refactorings we have done this time are as follows:
Delete
DefaultNoiseApplicator
andCustomNoiseApplicator
and replace them with closureThese two classes were provided for ease and simplicity of test implementation.
In reality, however, these classes served neither purpose. As evidenced by the fact that
DefaultNoiseApplicator
's class members are raw references, this class is effectively no different than a closure that reference-captures the required object.Although the member function
DetectionSensor<>::update
has the disadvantage of being larger in definition, I thought it would be more beneficial to reduce the total amount of code, so I removed those classes and replaced them with closures that do the equivalent work.Change the argument type of the noise application function
Previously, the noise application function (
CustomNoiseApplicator::operator ()
) was passed the DetectedObjects type, which is the message type that will eventually be published.However, each object stored in the DetectedObjects type does not have an identifier that can be used to identify the individual object, which makes it difficult to implement a specific noise model.
Therefore, the data type given to the noise application function was changed to
traffic_simulator_msgs::EntityStatus
, which holds the name of each entity.References
None.
Destructive Changes
None.
Known Limitations
None.