feat(autoware_planning_rviz_plugin): add pose visualization as an arrow#27
feat(autoware_planning_rviz_plugin): add pose visualization as an arrow#27ralwing wants to merge 6 commits intoautowarefoundation:mainfrom
Conversation
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds pose visualization as arrows to the Autoware planning RViz plugin, displaying trajectory pose directions with configurable arrow markers that originate from pose positions and are oriented by pose orientations.
- Adds new properties for pose visualization: view toggle, alpha, color, arrow length, and offset
- Implements arrow rendering using triangle geometry with shaft and head
- Integrates pose visualization into existing path footprint rendering loop
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
autoware_planning_rviz_plugin/include/autoware_planning_rviz_plugin/path/display_base.hpp
Outdated
Show resolved
Hide resolved
autoware_planning_rviz_plugin/include/autoware_planning_rviz_plugin/path/display_base.hpp
Outdated
Show resolved
Hide resolved
autoware_planning_rviz_plugin/include/autoware_planning_rviz_plugin/path/display_base.hpp
Outdated
Show resolved
Hide resolved
autoware_planning_rviz_plugin/include/autoware_planning_rviz_plugin/path/display_base.hpp
Outdated
Show resolved
Hide resolved
autoware_planning_rviz_plugin/include/autoware_planning_rviz_plugin/path/display_base.hpp
Outdated
Show resolved
Hide resolved
…s and rendering Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
129e007 to
35943da
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
… visibility Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
Signed-off-by: Grzegorz Głowacki <gglowacki@autonomous-systems.pl>
35943da to
12457d8
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const double p0_x = origin_x - shaft_width / 2.0 * sin_yaw; | ||
| const double p0_y = origin_y + shaft_width / 2.0 * cos_yaw; | ||
| const double p1_x = origin_x + shaft_width / 2.0 * sin_yaw; | ||
| const double p1_y = origin_y - shaft_width / 2.0 * cos_yaw; | ||
| const double p2_x = origin_x + shaft_length * cos_yaw + shaft_width / 2.0 * sin_yaw; | ||
| const double p2_y = origin_y + shaft_length * sin_yaw - shaft_width / 2.0 * cos_yaw; | ||
| const double p3_x = origin_x + shaft_length * cos_yaw - shaft_width / 2.0 * sin_yaw; | ||
| const double p3_y = origin_y + shaft_length * sin_yaw + shaft_width / 2.0 * cos_yaw; |
There was a problem hiding this comment.
[nitpick] The arrow geometry calculations use repeated expressions like 'shaft_width / 2.0 * sin_yaw' and 'shaft_width / 2.0 * cos_yaw'. Extract these as named constants (e.g., 'half_shaft_width_perp_x' and 'half_shaft_width_perp_y') to improve readability and reduce potential errors from repeated calculations.
| const double p0_x = origin_x - shaft_width / 2.0 * sin_yaw; | |
| const double p0_y = origin_y + shaft_width / 2.0 * cos_yaw; | |
| const double p1_x = origin_x + shaft_width / 2.0 * sin_yaw; | |
| const double p1_y = origin_y - shaft_width / 2.0 * cos_yaw; | |
| const double p2_x = origin_x + shaft_length * cos_yaw + shaft_width / 2.0 * sin_yaw; | |
| const double p2_y = origin_y + shaft_length * sin_yaw - shaft_width / 2.0 * cos_yaw; | |
| const double p3_x = origin_x + shaft_length * cos_yaw - shaft_width / 2.0 * sin_yaw; | |
| const double p3_y = origin_y + shaft_length * sin_yaw + shaft_width / 2.0 * cos_yaw; | |
| const double half_shaft_width_perp_x = shaft_width / 2.0 * sin_yaw; | |
| const double half_shaft_width_perp_y = shaft_width / 2.0 * cos_yaw; | |
| const double p0_x = origin_x - half_shaft_width_perp_x; | |
| const double p0_y = origin_y + half_shaft_width_perp_y; | |
| const double p1_x = origin_x + half_shaft_width_perp_x; | |
| const double p1_y = origin_y - half_shaft_width_perp_y; | |
| const double p2_x = origin_x + shaft_length * cos_yaw + half_shaft_width_perp_x; | |
| const double p2_y = origin_y + shaft_length * sin_yaw - half_shaft_width_perp_y; | |
| const double p3_x = origin_x + shaft_length * cos_yaw - half_shaft_width_perp_x; | |
| const double p3_y = origin_y + shaft_length * sin_yaw + half_shaft_width_perp_y; |
|
@yukkysaito i'm kindly pinging ;-) |
|
I have already approved it, but it looks like the CI hasn’t passed. I’ve re-triggered the CI, so please wait a moment. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
======================================
Coverage ? 0.00%
======================================
Files ? 12
Lines ? 1426
Branches ? 168
======================================
Hits ? 0
Misses ? 1426
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@yukkysaito friendly ping ;-) |
Description
This PR adds trajectory pose visualization as an arrow which shaft starts in the
pose.positionand directed bypose.orientationHow was this PR tested?
Tested in rviz.