Skip to content

Commit c94be5d

Browse files
refactor, use autoware utils
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
1 parent 6e095de commit c94be5d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

planning/behavior_path_sampling_planner_module/include/behavior_path_sampling_planner_module/sampling_planner_module.hpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ class SamplingPlannerModule : public SceneModuleInterface
215215
motion_utils::findNearestIndex(prev_module_reference_path->points, ego_pose);
216216
if (!nearest_index) return false;
217217
auto toYaw = [](const geometry_msgs::msg::Quaternion & quat) -> double {
218-
geometry_msgs::msg::Vector3 rpy;
219-
tf2::Quaternion q(quat.x, quat.y, quat.z, quat.w);
220-
tf2::Matrix3x3(q).getRPY(rpy.x, rpy.y, rpy.z);
218+
const auto rpy = tier4_autoware_utils::getRPY(quat);
221219
return rpy.z;
222220
};
223221
const auto quat = prev_module_reference_path->points[*nearest_index].point.pose.orientation;

0 commit comments

Comments
 (0)