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(tier4_planning_rviz_plugin): supress initial warning message #2960

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Feb 28, 2023

Description

Without this PR, the following warning message is shown on the terminal when launching autoware.launch.xml or turning on the visualization of the path marker.

[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'View Drivable Area')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Alpha')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Color')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Width')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'View Drivable Area')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Alpha')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Color')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Width')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'View Drivable Area')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Alpha')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Color')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Width')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'View Drivable Area')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Alpha')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Color')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Width')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'View Drivable Area')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Alpha')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Color')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Width')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'View Drivable Area')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Alpha')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Color')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Width')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'View Drivable Area')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Alpha')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Color')
[rviz2-38] QObject::connect: No such slot rviz_common::_RosTopicDisplay::updateVisualization()
[rviz2-38] QObject::connect:  (sender name:   'Width')

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.

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.

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

@github-actions github-actions bot added component:common Common packages from the autoware-common repository. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) labels Feb 28, 2023
@takayuki5168 takayuki5168 force-pushed the fix/remove-initial-warning-of-planning-rviz-plugin branch from f4465a9 to ed133b6 Compare February 28, 2023 05:05
@github-actions github-actions bot removed the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Feb 28, 2023
@takayuki5168 takayuki5168 marked this pull request as ready for review February 28, 2023 05:05
@takayuki5168 takayuki5168 requested review from yukkysaito and a team as code owners February 28, 2023 05:06
@takayuki5168
Copy link
Contributor Author

@purewater0901 cc @yukkysaito Could you approve the PR.

@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (1b35a6f) 11.95% compared to head (fa6537f) 11.95%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2960   +/-   ##
=======================================
  Coverage   11.95%   11.95%           
=======================================
  Files        1324     1324           
  Lines       92109    92106    -3     
  Branches    24623    24623           
=======================================
  Hits        11010    11010           
+ Misses      69685    69682    -3     
  Partials    11414    11414           
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 11.95% <ø> (+<0.01%) ⬆️ Carriedforward from 1b35a6f

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

Impacted Files Coverage Δ
...ier4_planning_rviz_plugin/include/path/display.hpp 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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +85 to +94
: property_drivable_area_view_{"View Drivable Area", true, "", this},
property_drivable_area_alpha_{"Alpha", 0.999, "", &property_drivable_area_view_},
property_drivable_area_color_{"Color", QColor(0, 148, 205), "", &property_drivable_area_view_},
property_drivable_area_width_{"Width", 0.3f, "", &property_drivable_area_view_}
{
property_drivable_area_view_ = new rviz_common::properties::BoolProperty(
"View Drivable Area", true, "", this, SLOT(updateVisualization()));
property_drivable_area_alpha_ = new rviz_common::properties::FloatProperty(
"Alpha", 0.999, "", property_drivable_area_view_, SLOT(updateVisualization()), this);
property_drivable_area_alpha_->setMin(0.0);
property_drivable_area_alpha_->setMax(1.0);
property_drivable_area_color_ = new rviz_common::properties::ColorProperty(
"Color", QColor(0, 148, 205), "", property_drivable_area_view_, SLOT(updateVisualization()),
this);
property_drivable_area_width_ = new rviz_common::properties::FloatProperty(
"Width", 0.3f, "", property_drivable_area_view_, SLOT(updateVisualization()), this);
property_drivable_area_width_->setMin(0.001);
property_drivable_area_alpha_.setMin(0.0);
property_drivable_area_alpha_.setMax(1.0);
property_drivable_area_width_.setMin(0.001);
Copy link
Contributor

Choose a reason for hiding this comment

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

If SLOT(updateVisualization()) is removed, I think visualization is not updated after parameters are changed.

Copy link
Contributor Author

@takayuki5168 takayuki5168 Mar 10, 2023

Choose a reason for hiding this comment

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

(Let me unresolve the comment not to forget the reason not to use SLOT(updateVisualization) 🙏 )
I had a discussion with Saito-san internally.

  • In order to register the updateVisualization function as SLOT, the class that has the function has Q_OBJECT type.
    • FYI: Error: Class declaration lacks Q_OBJECT macro.
  • The template class cannot have Q_OBJECT type.
    • FYI: Error: Template classes not supported by Q_OBJECT.
  • The derived class from the template class with the updateVisualiation function can be compiled, but the runtime error No such slot rviz_common::_RosTopicDisplay::updateVisualization() occurs.

In short, by the change to use a template class in order to make path/trajectory/... implementation common (#2871), now we cannot use SLOT(updateVisualization).

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@takayuki5168 takayuki5168 force-pushed the fix/remove-initial-warning-of-planning-rviz-plugin branch from ed133b6 to fa6537f Compare March 10, 2023 09:53
@takayuki5168 takayuki5168 changed the title fix(tier4_planning_rviz_plugin): remove initial warning message fix(tier4_planning_rviz_plugin): supress initial warning message Mar 10, 2023
@yukkysaito yukkysaito self-requested a review March 10, 2023 09:54
Copy link
Contributor

@yukkysaito yukkysaito left a comment

Choose a reason for hiding this comment

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

LGTM

@takayuki5168 takayuki5168 enabled auto-merge (squash) March 10, 2023 10:10
@takayuki5168 takayuki5168 merged commit 85821ea into autowarefoundation:main Mar 10, 2023
@takayuki5168 takayuki5168 deleted the fix/remove-initial-warning-of-planning-rviz-plugin branch March 10, 2023 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants