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

feat(perception_replayer): add a new perception_reproducer. #44

Merged
merged 8 commits into from
Jun 11, 2024

Conversation

xtk8532704
Copy link
Contributor

@xtk8532704 xtk8532704 commented Jun 7, 2024

Description

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.

How perception_reproducer_v2 works:

  1. Generating reproduction_sequence: Whenever the ego's position changes, a chronological reproduce_sequence is generated or regenerated.

    • A list of nearby_ego_odom_indies is found, which contains those odom massages close to the current ego pose within a search radius (default to 1 m), if the list is empty, the nearest odom massage in the rosebag is added to the list to make sure it's not empty.image

    • A larger list of rosbag_ego_odom_indices is found by searching those odom rosbag massages with a position close to the elements in nearby_ego_odom_indies within a radius (default 1 m).image

    • The list is sorted by timestamp, and those odom rosbag massages in the cooldown queue are filtered out.

    • set this list as the reproduce_sequence.

  2. Publishing perception msg: 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.

    • 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.
  3. Why this design?:

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

Related links

https://tier4.atlassian.net/browse/RT1-6389

Tests performed

Screencast.from.2024.06.10.21.02.37.webm

Notes for reviewers

Note: this PR also contains two bugfix PR's modifications( fix(perception_replayer): order rosbags by starting_time, fix(perception_reproducer): Support reproduce/replay old rosbags. Before reviewing this, you may check and approve those two first.

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 force-pushed the feat/perception_reproducer_v2 branch 2 times, most recently from d5364e0 to 5e025ce Compare June 11, 2024 04:00
…h old 'autoware_auto_perception_msgs' in old rosbags.

Signed-off-by: temkei.kem <[email protected]>
@xtk8532704 xtk8532704 force-pushed the feat/perception_reproducer_v2 branch from e961684 to a80a1c8 Compare June 11, 2024 05:58
@xtk8532704 xtk8532704 enabled auto-merge (squash) June 11, 2024 06:01
pre-commit-ci bot and others added 4 commits June 11, 2024 06:01
@xtk8532704 xtk8532704 merged commit 10b1ae3 into main Jun 11, 2024
17 checks passed
@xtk8532704 xtk8532704 deleted the feat/perception_reproducer_v2 branch June 19, 2024 08:22
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.

2 participants