Hiep sử custom và thông số rotate

This commit is contained in:
2026-04-24 14:52:11 +07:00
parent 9c14054d3f
commit 875db4ba1e
2 changed files with 5 additions and 5 deletions

View File

@@ -519,9 +519,9 @@ mkt_msgs::Trajectory2D mkt_algorithm::diff::PredictiveTrajectory::calculator(
const double distance_allow_rotate = min_journey_squared_; const double distance_allow_rotate = min_journey_squared_;
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 |= allow_rotate |= path_distance_to_rotate >= distance_allow_rotate;
(path_distance_to_rotate >= distance_allow_rotate && allow_rotate |= fabs(transformed_plan.poses.back().pose.theta) >= M_PI / 2;
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 * cos(transformed_plan.poses.front().pose.theta)) <= 0.1;
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))