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

fix(ground segmentation): add elevation grid ground filter #1899

Conversation

badai-nguyen
Copy link
Contributor

@badai-nguyen badai-nguyen commented Sep 16, 2022

Description

Current scan_ground_filter use the input from cropped_box_filter which limited from 0 < z < vehicle_height. Therefore, in case of uneven road or slope, the ground pcl might be filtered out and failure to initialize initial point cloud by scan_ground_filter.
Extending range of crop_box_filter might cause height computation cost and unexpected miss-classification.
This makes sure ground filter to detect object on slope and uneven road while keep reasonable range of detection.

Current issue:

image

To cover a slope, crop_box_filter range should be extended:

image

image

Related links

JIRA link: TIERIV INTERNAL LINK

Tests performed

image

sample-rosbag_00d88dcb3_top_30deg (1)

Notes for reviewers

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.

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 10.14% // Head: 10.11% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (9143f38) compared to base (5e748e3).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1899      +/-   ##
==========================================
- Coverage   10.14%   10.11%   -0.03%     
==========================================
  Files        1256     1256              
  Lines       90741    90985     +244     
  Branches    20516    20516              
==========================================
  Hits         9203     9203              
- Misses      72130    72374     +244     
  Partials     9408     9408              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 10.12% <0.00%> (ø) Carriedforward from 927141b

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...ground_segmentation/scan_ground_filter_nodelet.hpp 0.00% <0.00%> (ø)
...nd_segmentation/src/scan_ground_filter_nodelet.cpp 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

badai-nguyen and others added 7 commits September 20, 2022 09:40
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
pre-commit-ci bot and others added 3 commits September 20, 2022 06:47
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
@badai-nguyen badai-nguyen marked this pull request as ready for review September 20, 2022 12:09
@@ -91,6 +150,202 @@ void ScanGroundFilterComponent::calcVirtualGroundOrigin(pcl::PointXYZ & point)
point.z = 0;
}

void ScanGroundFilterComponent::gridScan_classifyPointCloud(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think lower camel case is better because other functions are used lower camel case.
Also, this function has deep nest. Can you remove deep nest by make sub-function or something?

Copy link
Contributor Author

@badai-nguyen badai-nguyen Sep 25, 2022

Choose a reason for hiding this comment

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

thanks for your comment. I fixed it by 26c88bd

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
for (size_t i = 0; i < in_cloud->points.size(); ++i) {
auto x{
in_cloud->points[i].x - vehicle_info_.wheel_base_m / 2.0f -
center_pcl_shift_}; // base on front wheel center
Copy link
Contributor

Choose a reason for hiding this comment

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

[Q] When do you need to tune center_pcl_shift ? What is the purpose of this parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When some addition LiDARs setup on rear or front of vehicle is used. It is better to move the ray division center to be close to location with LiDAR.

Copy link
Contributor

@miursh miursh Oct 4, 2022

Choose a reason for hiding this comment

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

OK 👍
Could you add some description about this to README?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added here 9143f38

@miursh
Copy link
Contributor

miursh commented Oct 3, 2022

@badai-nguyen Could you add you and me to the maintainer in package.xml ?

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
@miursh
Copy link
Contributor

miursh commented Oct 4, 2022

@badai-nguyen Could you add TIER IV JIRA Link to "Related links"?

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Copy link
Contributor

@miursh miursh left a comment

Choose a reason for hiding this comment

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

LGTM

@miursh
Copy link
Contributor

miursh commented Oct 5, 2022

@yukkysaito If you are ok, could you approve this?

@yukkysaito
Copy link
Contributor

LGTM

@badai-nguyen badai-nguyen merged commit 5695431 into autowarefoundation:main Oct 6, 2022
tkimura4 pushed a commit to tier4/autoware.universe that referenced this pull request Oct 14, 2022
…oundation#1899)

* fix: add grid elevation scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix: merge with scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: remove debug variables

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: add switchable param for grid scan mode

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
tkimura4 added a commit to tier4/autoware.universe that referenced this pull request Oct 17, 2022
* fix(ground_filter): remove base_frame and fix ray_ground_filter  (#1614)

* fix(ray_ground_filter): cannot remove ground pcl

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix: remove base_frame

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: remove unnecessary calculation

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: remove unnecessary calculation

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update parameters

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update parameters

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix(ground segmentation): add elevation grid ground filter (autowarefoundation#1899)

* fix: add grid elevation scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix: merge with scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: remove debug variables

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: add switchable param for grid scan mode

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Co-authored-by: badai nguyen <94814556+badai-nguyen@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@badai-nguyen badai-nguyen deleted the fix/grid_elevation_ground_filter branch November 10, 2022 02:28
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Jan 16, 2023
* fix(ground_filter): remove base_frame and fix ray_ground_filter  (autowarefoundation#1614)

* fix(ray_ground_filter): cannot remove ground pcl

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix: remove base_frame

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: remove unnecessary calculation

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: remove unnecessary calculation

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update parameters

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update parameters

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix(ground segmentation): add elevation grid ground filter (autowarefoundation#1899)

* fix: add grid elevation scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix: merge with scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: remove debug variables

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: add switchable param for grid scan mode

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Co-authored-by: badai nguyen <94814556+badai-nguyen@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
badai-nguyen added a commit to badai-nguyen/autoware.universe that referenced this pull request Feb 2, 2023
…oundation#1899)

* fix: add grid elevation scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix: merge with scan ground filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: remove debug variables

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: add switchable param for grid scan mode

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: refactoring

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update docs

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* ci(pre-commit): autofix

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chores: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: typo

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* docs: update

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

3 participants