From 23f3cd1b8b8ef037ecd31c10f8d6fbd84ef3d7c4 Mon Sep 17 00:00:00 2001 From: YajiaZhang Date: Thu, 5 Jul 2018 15:49:54 -0700 Subject: [PATCH] planning: bug fix for rotation correction --- modules/planning/common/trajectory/trajectory_stitcher.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/planning/common/trajectory/trajectory_stitcher.cc b/modules/planning/common/trajectory/trajectory_stitcher.cc index 32701d16ea3..2ff0bf62c19 100644 --- a/modules/planning/common/trajectory/trajectory_stitcher.cc +++ b/modules/planning/common/trajectory/trajectory_stitcher.cc @@ -81,7 +81,7 @@ void TrajectoryStitcher::TransformLastPublishedTrajectory(const double x_diff, auto x_new = cos_theta * x - sin_theta * y + tx; auto y_new = sin_theta * x + cos_theta * y + ty; - auto theta_new = common::math::WrapAngle(theta + theta_diff); + auto theta_new = common::math::WrapAngle(theta - theta_diff); p.mutable_path_point()->set_x(x_new); p.mutable_path_point()->set_y(y_new);