提交 c4152821 编写于 作者: Z zhuweicheng 提交者: Qi Luo

Planning : fix bug on set planning target

上级 1eea6361
......@@ -128,8 +128,7 @@ void Trajectory1dGenerator::GenerateLongitudinalTrajectoryBundle(
GenerateSpeedProfilesForPathTimeObstacles(ptr_lon_trajectory_bundle);
if (planning_target.has_stop_point()
&& planning_target.stop_point().s() > 0) {
if (planning_target.has_stop_point()) {
GenerateSpeedProfileForStopping(planning_target.stop_point().s(),
ptr_lon_trajectory_bundle);
}
......
......@@ -298,9 +298,12 @@ Status LatticePlanner::PlanOnReferenceLine(
if (!lattice_traj_ptr) {
ADEBUG << "Dynamically casting trajectory1d ptr. failed.";
}
ADEBUG << "Ending Lon. State s = " << lattice_traj_ptr->target_position()
<< " ds = " << lattice_traj_ptr->target_velocity()
<< " t = " << lattice_traj_ptr->target_time();
if (lattice_traj_ptr->has_target_position()) {
ADEBUG << "Ending Lon. State s = " << lattice_traj_ptr->target_position()
<< " ds = " << lattice_traj_ptr->target_velocity()
<< " t = " << lattice_traj_ptr->target_time();
}
ADEBUG << "InputPose";
ADEBUG << "XY: " << planning_init_point.ShortDebugString();
......
......@@ -125,17 +125,18 @@ void TrafficDecider::BuildPlanningTarget(
stop_point.set_type(StopPoint::SOFT);
ADEBUG << "Soft stop at: " << min_s << " STOP_REASON_YELLOW_SIGNAL";
} else {
min_s = -1.0;
ADEBUG << "No planning target found at reference line.";
}
}
}
const auto& vehicle_config =
if (min_s != std::numeric_limits<double>::infinity()) {
const auto& vehicle_config =
common::VehicleConfigHelper::instance()->GetConfig();
double front_edge_to_center =
double front_edge_to_center =
vehicle_config.vehicle_param().front_edge_to_center();
stop_point.set_s(min_s - front_edge_to_center);
reference_line_info->SetStopPoint(stop_point);
stop_point.set_s(min_s - front_edge_to_center);
reference_line_info->SetStopPoint(stop_point);
}
}
Status TrafficDecider::Execute(Frame *frame,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册