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(euclidean_cluster): add diagnostics warning when cluster skipped #10278

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ogrex
Copy link

@ogrex ogrex commented Mar 17, 2025

Description

add diagnostics warning when cluster skipped due to excessive points from large objects

Related links

Parent Issue:

  • Link

How was this PR tested?

Tested by running logging simulator

OK:
image

Warnings:
image

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Mar 17, 2025
Copy link

github-actions bot commented Mar 17, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@ogrex ogrex changed the title Feat/euclidean cluster/add diag feat(euclidean_cluster): add diagnostics warning when cluster skipped Mar 17, 2025
@ogrex ogrex requested a review from technolojin March 17, 2025 05:52
@technolojin technolojin self-assigned this Mar 17, 2025
@@ -136,10 +168,19 @@ bool VoxelGridBasedEuclideanCluster::cluster(

// build output and check cluster size
{
// At the start, create a container to collect warnings.
std::vector<std::string> warning_messages;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning_messages could be diagnostics level not only WARN but ERROR.
Therefore I would like to suggest

Suggested change
std::vector<std::string> warning_messages;
std::vector<std::string> diagnostics_messages;


// After processing all clusters, publish a summary of diagnostics.
void VoxelGridBasedEuclideanCluster::publishDiagnosticsSummary(
const std::vector<std::string> & warnings,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const std::vector<std::string> & warnings,
const std::vector<std::string> & diagnostics_messages,

Copy link
Contributor

Choose a reason for hiding this comment

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

Here is two option

  1. If the cluster size is the only diagnostics and other diagnostics will not be added in the future, it shall be named diagnostics_cluster_max_size or something similar.
  2. There is any chance to add different type of diagnostics, pair with an index to distinguish diag type, and it will named diagnostics_messages

Comment on lines 182 to 183
warning_messages.push_back(
" Cluster " + std::to_string(i) + " (" + std::to_string(cluster_size) + ").");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
warning_messages.push_back(
" Cluster " + std::to_string(i) + " (" + std::to_string(cluster_size) + ").");
warning_messages.push_back(
" Cluster " + std::to_string(i) + " (" + std::to_string(cluster_size) + " > "+ max_cluster_size_ +").");

Copy link
Contributor

Choose a reason for hiding this comment

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

Indicate current maximum value to user.

Copy link
Author

Choose a reason for hiding this comment

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

The diagnostics messages are modified in the latest commit as the following reasons

  1. current cluster implementation will make the point number in skipped cluster just exactly the same as threshold+1, making the information of point number in a cluster redundant
  2. without cluster point number, cluster index becomes redundant
    so now output will only gives information of threshold and total number of skipped clusters

@ogrex ogrex marked this pull request as ready for review March 19, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned)
Projects
Status: To Triage
Development

Successfully merging this pull request may close these issues.

2 participants