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
Fix a bug that perception_replayer/perception_reproducer can't publish old 'autoware_auto_perception_msgs' in old rosbags.
Add a new perception_reproducer_v2, that makes it possible to replay rosbag in chronological order even when ego is stopped. The algorithm follows this discussion:
Related links
https://tier4.atlassian.net/browse/RT1-6389
Tests performed
Notes for reviewers
About how perception_reproducer_v2 work
Reproduction Sequence Generation: Whenever the ego's position changes, a chronological
reproduce_sequence
is generated or regenerated.Data Publication: The first element in the
reproduce_sequence
is popped and published. Published elements are added to a cooldown queue to prevent the same data from being republished in a short time during the ego's movement.Reproduction Sequence Generation Details:
ego_odom
in the rosbag according to the current ego pose is found and set asnearst_ego_odom_ind
.ego_odom_indices
is found, which containsego_odom_indices
close to thenearst_ego_odom_ind
within a search radius (default 1 m).ego_odom_indices
in the cooldown queue are removed.Data Publication Details:
reproduce_sequence
is popped and related perception messages are published.reproduce_sequence
is empty, the data that was published last time is published again.What is it for?:
reproduce_sequence
will update each time and the first element will be published, so it works as the originalperception_reproducer
.reproduce_sequence
will be published sequentially untilreproduce_sequence
is empty.Interface changes
Effects on system behavior
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.