Hiep sử custom và thông số rotate
This commit is contained in:
@@ -519,11 +519,11 @@ 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))
|
||||||
{
|
{
|
||||||
if (!stopped(velocity, max_vel_theta_ + rot_stopped_velocity_, trans_stopped_velocity_))
|
if (!stopped(velocity, max_vel_theta_ + rot_stopped_velocity_, trans_stopped_velocity_))
|
||||||
|
|||||||
Reference in New Issue
Block a user