Skip to content

Commit 35943da

Browse files
committed
fix(display_base): improve arrow head and shaft dimensions for better visibility
Signed-off-by: Grzegorz Głowacki <[email protected]>
1 parent d90d398 commit 35943da

File tree

1 file changed

+7
-3
lines changed
  • autoware_planning_rviz_plugin/include/autoware_planning_rviz_plugin/path

1 file changed

+7
-3
lines changed

autoware_planning_rviz_plugin/include/autoware_planning_rviz_plugin/path/display_base.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,14 @@ class AutowarePathBaseDisplay : public rviz_common::MessageFilterDisplay<T>
638638
const double offset = property_pose_offset_.getFloat();
639639
const double yaw = tf2::getYaw(pose.orientation);
640640
const double arrow_length = property_pose_arrow_length_.getFloat();
641-
const double head_length = arrow_length * 0.4;
642-
const double head_width = arrow_length * 0.5; // Make head wider and more visible
641+
constexpr static double HEAD_LENGTH_RATIO = 0.4;
642+
constexpr static double HEAD_WIDTH_RATIO = 0.5;
643+
constexpr static double SHAFT_WIDTH_RATIO = 0.15;
644+
645+
const double head_length = arrow_length * HEAD_LENGTH_RATIO;
646+
const double head_width = arrow_length * HEAD_WIDTH_RATIO;
643647
const double shaft_length = arrow_length - head_length;
644-
const double shaft_width = arrow_length * 0.15;
648+
const double shaft_width = arrow_length * SHAFT_WIDTH_RATIO;
645649

646650
const double cos_yaw = std::cos(yaw);
647651
const double sin_yaw = std::sin(yaw);

0 commit comments

Comments
 (0)