Skip to content

Conversation

@ralwing
Copy link

@ralwing ralwing commented Nov 18, 2025

Description

This PR adds trajectory pose visualization as an arrow which shaft starts in the pose.position and directed by pose.orientation

Screenshot from 2025-11-18 08-54-50 image

How was this PR tested?

Tested in rviz.

Copilot AI review requested due to automatic review settings November 18, 2025 07:52
@ralwing ralwing requested review from a team, takayuki5168 and yukkysaito as code owners November 18, 2025 07:52
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

Copilot finished reviewing on behalf of ralwing November 18, 2025 07:54
Copy link

Copilot AI left a 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.

ralwing and others added 5 commits November 18, 2025 15:42
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]>
Signed-off-by: Grzegorz Głowacki <[email protected]>
@ralwing ralwing requested a review from Copilot November 18, 2025 14:44
Copilot finished reviewing on behalf of ralwing November 18, 2025 14:44
Copy link

Copilot AI left a 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.

Comment on lines +656 to +663
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;
Copy link

Copilot AI Nov 18, 2025

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.

Suggested change
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;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants