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: new rviz ui - speed/gear/turnsignal/steering #5957

Merged
merged 52 commits into from
Jan 29, 2024
Merged

Conversation

KhalilSelyan
Copy link
Contributor

@KhalilSelyan KhalilSelyan commented Dec 25, 2023

Description

This PR introduces a comprehensive update to the RVIZ2 interface in the context of the Autoware project. It focuses on implementing a new plugin designed to enhance user interaction and data visualization. Key features of this plugin include:

  • Steering Wheel Visualization: Provides real-time feedback on steering angle and direction.
  • Velocity Indicators: Displays current speed and acceleration dynamically.
  • Turn Signals: Integrates signal status, enhancing the simulation's realism.
  • Gear Display: Shows the current gear state, vital for understanding vehicle control dynamics.

The goal of this update is to provide a more intuitive and informative user experience, especially beneficial for testing and demonstrating autonomous vehicle functionalities.

This PR addresses the issue discussed here: #3984.

Related links

Notes for reviewers

Currently, the plugin only works with hardcoded topics to subscribe to. There is an issue with the rviz_common::RosTopicProperty.

Interface changes

Introducing a new UI to replace the current Tier4 Vehicle RVIZ Plugin.

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.

@KhalilSelyan KhalilSelyan added the type:ui-ux User interface, user experience, graphical user interfaces. label Dec 25, 2023
@KhalilSelyan KhalilSelyan requested a review from xmfcx December 25, 2023 10:17
@KhalilSelyan KhalilSelyan self-assigned this Dec 25, 2023
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) labels Dec 25, 2023
@xmfcx
Copy link
Contributor

xmfcx commented Dec 25, 2023

feat: ✨ new rviz ui - speed/gear/turnsignal/steering

Could you rename the commit message and the PR title to not contain emojis?

The other commits can contain emojis. (they will be automatically squashed when merging with the main branch)

@KhalilSelyan KhalilSelyan changed the title feat: ✨ new rviz ui - speed/gear/turnsignal/steering feat: new rviz ui - speed/gear/turnsignal/steering Dec 25, 2023
@xmfcx
Copy link
Contributor

xmfcx commented Dec 29, 2023

The Q_OBJECT or Qt dependent inheritance is only needed in signal_display files.

Could you check 80d5fe3 and apply it to the others too?

@xmfcx
Copy link
Contributor

xmfcx commented Dec 29, 2023

I noticed that the naming convention for the files varies. For consistency and in line with the Google C++ Style Guide, it might be beneficial to consider using snake_case for naming all files.

Also the headers should have the .hpp extension instead of .h.

@xmfcx
Copy link
Contributor

xmfcx commented Dec 29, 2023

Fixed the segfault on the topic change. Added a detailed explanation on this commit:

@xmfcx
Copy link
Contributor

xmfcx commented Dec 29, 2023

About the "signal" name collision, this problem is deeply tied to the MOC (Meta-Object Compiler) which autogenerates code on the compile time for Qt.
The #ifndef Q_MOC_RUN should have maybe prevented it but it seems it didn't have an effect for our use case.

I tried many different ways of solving it, also checked the RViz source code and its plugins etc. and it seems RViz had problems with it too and they also did many workarounds.

For our use case, the only solution I could come up is to separate out the traffic light plugin (can still stay within the same package and PR).

The trick is to not involve the file which includes the signal header with the MOC or Qt macros in general.

For this, you can use marker_array_display plugin as reference:

@isamu-takagi
Copy link
Contributor

I excluded Doxyfile but it is still failing. Could you please fix following the spell-check-partial CI?

@KhalilSelyan
Copy link
Contributor Author

All spell check partial issues have been fixed

@isamu-takagi isamu-takagi added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jan 22, 2024
@isamu-takagi
Copy link
Contributor

The pre-commit and colcon test are failing. It looks like a copyright and lint issue.

@KhalilSelyan
Copy link
Contributor Author

Seems that the build-test ci is failing for some reason I couldn't understand
https://github.com/autowarefoundation/autoware.universe/actions/runs/7653788429/job/20856395515#step:7:297 @isamu-takagi

@@ -0,0 +1,30 @@
# Copyright (c) 2021, Open Source Robotics Foundation, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

RViz2 has "The Clear BSD License" it seems.

https://github.com/ros2/rviz/blob/rolling/LICENSE

Copy link
Contributor

@xmfcx xmfcx Jan 25, 2024

Choose a reason for hiding this comment

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

Suggested change
# Copyright (c) 2021, Open Source Robotics Foundation, Inc.
# Copyright (c) 2021, Open Source Robotics Foundation, Inc.
# The Clear BSD License

lets try this

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that the copyright notice must exactly match this file. I confirmed that the following changes pass the ament_copyright check.

  • Undo adding The Clear BSD License
  • Move All rights reserved. to the same line as Copyright (c) ...
  • Replace the Willow Garage, Inc. with the copyright holder
    • I think this needs to be moved to the top copyright (c) part, but I don't know the publication year.
  • Replace THE COPYRIGHT OWNER with THE COPYRIGHT HOLDER

My opinion is to add the find_package for qt to CMakeLists.txt and delete this file. Adding find_package is a common practice so I don't think it's necessary to keep this file.

Copy link

codecov bot commented Jan 27, 2024

Codecov Report

Attention: 950 lines in your changes are missing coverage. Please review.

Comparison is base (7022620) 14.58% compared to head (927d930) 14.47%.
Report is 2 commits behind head on main.

Files Patch % Lines
...wf_2d_overlay_vehicle/src/overlay_text_display.cpp 0.00% 335 Missing ⚠️
...ugin/awf_2d_overlay_vehicle/src/signal_display.cpp 0.00% 276 Missing ⚠️
...lugin/awf_2d_overlay_vehicle/src/overlay_utils.cpp 0.00% 113 Missing ⚠️
..._2d_overlay_vehicle/src/steering_wheel_display.cpp 0.00% 47 Missing ⚠️
...gin/awf_2d_overlay_vehicle/src/traffic_display.cpp 0.00% 44 Missing ⚠️
...wf_2d_overlay_vehicle/src/turn_signals_display.cpp 0.00% 42 Missing ⚠️
...awf_2d_overlay_vehicle/src/speed_limit_display.cpp 0.00% 33 Missing ⚠️
...lugin/awf_2d_overlay_vehicle/src/speed_display.cpp 0.00% 32 Missing ⚠️
...plugin/awf_2d_overlay_vehicle/src/gear_display.cpp 0.00% 25 Missing ⚠️
...overlay_vehicle/include/steering_wheel_display.hpp 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5957      +/-   ##
==========================================
- Coverage   14.58%   14.47%   -0.11%     
==========================================
  Files        1871     1883      +12     
  Lines      127557   128507     +950     
  Branches    37316    37316              
==========================================
  Hits        18606    18606              
- Misses      88031    88981     +950     
  Partials    20920    20920              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 14.58% <ø> (ø) Carriedforward from 7022620

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@isamu-takagi isamu-takagi left a comment

Choose a reason for hiding this comment

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

LGTM

@xmfcx xmfcx merged commit ba21eec into main Jan 29, 2024
20 of 25 checks passed
@xmfcx xmfcx deleted the feat/modernize-rviz-ui branch January 29, 2024 14:49
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Jan 29, 2024
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
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) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned) type:ui-ux User interface, user experience, graphical user interfaces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants