-
Notifications
You must be signed in to change notification settings - Fork 9
feat(autoware_planning_rviz_plugin): add pose visualization as an arrow #27
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
base: main
Are you sure you want to change the base?
feat(autoware_planning_rviz_plugin): add pose visualization as an arrow #27
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
129e007 to
35943da
Compare
Co-authored-by: Copilot <[email protected]> Signed-off-by: Grzegorz Głowacki <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Grzegorz Głowacki <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Grzegorz Głowacki <[email protected]>
… visibility Signed-off-by: Grzegorz Głowacki <[email protected]>
Signed-off-by: Grzegorz Głowacki <[email protected]>
35943da to
12457d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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; |
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.