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): enable to specify region filter. #68

Merged
merged 15 commits into from
Dec 25, 2024

Conversation

MasatoSaeki
Copy link
Contributor

@MasatoSaeki MasatoSaeki commented Dec 19, 2024

Types of PR

  • New Features
  • Upgrade of existing features
  • Bugfix

Description

This PR enables to specify region based on x-y coordinate from ego, and you can still use distance filter.

Interface roles

  1. You can only specify Distance or Region
  2. Specification role is that lower_limit and upper_limit are combined by , while Distance is combined by -.
  3. You must specify lower_limit and upper_limit of x_position or y_position if use Region.

How to review this PR

Fundamentally, follow this docs
assume that you have already done build of Autoware. To use branch is below.

  • driving_log_replayer_v2 -> feat/limitation_by_area
  • perception_eval -> feat/limitation_by_area
mkdir -p ~/driving_log_replayer_v2
gdown -O ~/driving_log_replayer_v2/sample_dataset_v2.tar.zst 'https://docs.google.com/uc?export=download&id=1iCoykBBETI_rGfKEFYYb7LFydF-RJVkC'
tar -I zstd -xvf ~/driving_log_replayer_v2/sample_dataset_v2.tar.zst -C ~/driving_log_replayer_v2/
gdown -O ~/driving_log_replayer_v2/sample-map-planning.zip 'https://docs.google.com/uc?export=download&id=1499_nsbUbIeturZaDj7jhUownh5fvXHd'
unzip -d ~/driving_log_replayer_v2/ ~/driving_log_replayer_v2/sample-map-planning.zip
mv ~/driving_log_replayer_v2/sample-map-planning ~/driving_log_replayer_v2/sample_dataset/map
SAMPLE_ROOT=${path/to/autoware}/src/simulator/driving_log_replayer_v2/sample
cp ${SAMPLE_ROOT}/perception/scenario.yaml ~/driving_log_replayer_v2/perception.yaml
source install setup.bash
 ros2 launch driving_log_replayer_v2 driving_log_replayer_v2.launch.py scenario_path:=$HOME/driving_log_replayer_v2/perception.yaml dataset_index:=0 sensing:=false

You can specify region like below

Filter:
  Distance: null # [m] null [Do not filter by distance] or lower_limit-(upper_limit) [Upper limit can be omitted. If omitted value is 1.7976931348623157e+308]
  Region:
    x_position: -10,10 # [m] null [Do not filter by x_position] or lower_limit,upper_limit [Upper limit can be omitted. If omitted value is 1.7976931348623157e+308]
    y_position: 0,20 # [m] null [Do not filter by y_position] or lower_limit,upper_limit [Upper limit can be omitted. If omitted value is 1.7976931348623157e+308]

Others

Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Signed-off-by: MasatoSaeki <[email protected]>
Copy link
Collaborator

@hayato-m126 hayato-m126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the distance from the center is always positive, it is possible to get the lower upper by splitting a string like 0.0-18.0 with -.

But with postion, aren't there also negative values?
For example, if it is -1.0-18.0, it is difficult to handle because there are multiple hyphens.

Other than that, I didn't see anything else that bothered me.

hayato-m126
hayato-m126 previously approved these changes Dec 23, 2024
Copy link
Collaborator

@hayato-m126 hayato-m126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specification role is that lower_limit and upper_limit are combined by , while Distance is combined by -.

I had missed it.

@MasatoSaeki MasatoSaeki marked this pull request as ready for review December 23, 2024 02:47
@MasatoSaeki
Copy link
Contributor Author

MasatoSaeki commented Dec 25, 2024

@hayato-m126
I change traffic light code in order to adopt this PR (I have checked this PR on my local pc). a8fec35

And, I wait for releasing autoware_perception_evaluation which related PR to pass ci/cd.

Signed-off-by: MasatoSaeki <[email protected]>
@MasatoSaeki MasatoSaeki force-pushed the feat/limitation_by_area branch from 718d088 to a8fec35 Compare December 25, 2024 02:52
@hayato-m126
Copy link
Collaborator

hayato-m126 commented Dec 25, 2024

The reason why colcon test is failing is because the main branch of perception_eval does not contain the update corresponding to this PR.
If you test with develop branch of perception_eval, unit test passes.

Copy link
Collaborator

@hayato-m126 hayato-m126 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hayato-m126 hayato-m126 merged commit 3fefb13 into develop Dec 25, 2024
6 checks passed
@hayato-m126 hayato-m126 deleted the feat/limitation_by_area branch December 25, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants