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

Improve/perception replayer #39

Closed
wants to merge 6 commits into from
Closed

Conversation

xtk8532704
Copy link
Contributor

@xtk8532704 xtk8532704 commented Jun 7, 2024

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

  1. Reproduction Sequence Generation: Whenever the ego's position changes, a chronological reproduce_sequence is generated or regenerated.

  2. 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.

  3. Reproduction Sequence Generation Details:

    • The nearest ego_odom in the rosbag according to the current ego pose is found and set as nearst_ego_odom_ind.
    • A list of ego_odom_indices is found, which contains ego_odom_indices close to the nearst_ego_odom_ind within a search radius (default 1 m).
    • The list is sorted by timestamp, and those ego_odom_indices in the cooldown queue are removed.
  4. Data Publication Details:

    • The first element in reproduce_sequence is popped and related perception messages are published.
    • The cooldown queue is updated with the published data.
    • If reproduce_sequence is empty, the data that was published last time is published again.
  5. What is it for?:

    • If the ego is moving, the reproduce_sequence will update each time and the first element will be published, so it works as the original perception_reproducer.
    • If the ego stops, data in reproduce_sequence will be published sequentially until reproduce_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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@xtk8532704 xtk8532704 closed this Jun 7, 2024
@xtk8532704 xtk8532704 deleted the improve/perception_replayer branch June 7, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant