From b7475206e1bd7a761cd9aac722a17b3858680816 Mon Sep 17 00:00:00 2001 From: Ryuta Kambe Date: Thu, 20 Jun 2024 18:31:53 +0900 Subject: [PATCH] fix(autoware_freespace_planning_algorithms): fix constStatement warning (#7580) Signed-off-by: Ryuta Kambe --- .../src/astar_search.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/planning/autoware_freespace_planning_algorithms/src/astar_search.cpp b/planning/autoware_freespace_planning_algorithms/src/astar_search.cpp index 6d093b3c7c0cd..6b04ca87bfb7d 100644 --- a/planning/autoware_freespace_planning_algorithms/src/astar_search.cpp +++ b/planning/autoware_freespace_planning_algorithms/src/astar_search.cpp @@ -86,8 +86,9 @@ AstarSearch::TransitionTable createTransitionTable( for (int i = 0; i < turning_radius_size; ++i) { double R = R_min + i * dR; double step = R * dtheta; - const NodeUpdate forward_left{ - R * sin(dtheta), R * (1 - cos(dtheta)), dtheta, step, true, false}; + const double shift_x = R * sin(dtheta); + const double shift_y = R * (1 - cos(dtheta)); + const NodeUpdate forward_left{shift_x, shift_y, dtheta, step, true, false}; const NodeUpdate forward_right = forward_left.flipped(); forward_node_candidates.push_back(forward_left); forward_node_candidates.push_back(forward_right);