update logic xoay
This commit is contained in:
@@ -521,7 +521,8 @@ mkt_msgs::Trajectory2D mkt_algorithm::diff::PredictiveTrajectory::calculator(
|
|||||||
const double path_distance_to_rotate = journey(transformed_plan.poses, 0, transformed_plan.poses.size() - 1);
|
const double path_distance_to_rotate = journey(transformed_plan.poses, 0, transformed_plan.poses.size() - 1);
|
||||||
allow_rotate |= path_distance_to_rotate >= distance_allow_rotate;
|
allow_rotate |= path_distance_to_rotate >= distance_allow_rotate;
|
||||||
allow_rotate |= fabs(transformed_plan.poses.back().pose.theta) >= M_PI / 2;
|
allow_rotate |= fabs(transformed_plan.poses.back().pose.theta) >= M_PI / 2;
|
||||||
allow_rotate &= fabs(transformed_plan.poses.front().pose.y * cos(transformed_plan.poses.front().pose.theta)) <= 0.1;
|
allow_rotate &= (fabs(transformed_plan.poses.front().pose.y) <= 0.5);
|
||||||
|
|
||||||
|
|
||||||
double angle_to_heading;
|
double angle_to_heading;
|
||||||
if (allow_rotate && shouldRotateToPath(transformed_plan, carrot_pose, velocity, angle_to_heading, sign_x))
|
if (allow_rotate && shouldRotateToPath(transformed_plan, carrot_pose, velocity, angle_to_heading, sign_x))
|
||||||
|
|||||||
Reference in New Issue
Block a user