提交 a80c1e26 编写于 作者: J jmtao 提交者: Xiangquan Xiao

planning: add gflag default_cruise_speed to reference_line_info

上级 fe082e90
......@@ -103,9 +103,11 @@ bool ReferenceLineInfo::Init(const std::vector<const Obstacle*>& obstacles) {
FLAGS_speed_bump_speed_limit);
}
// set lattice planning target speed limit;
SetCruiseSpeed(FLAGS_default_cruise_speed);
// set lattice planning target speed limit;
SetLatticeCruiseSpeed(FLAGS_default_cruise_speed);
vehicle_signal_.Clear();
return true;
......@@ -447,11 +449,11 @@ const DiscretizedTrajectory& ReferenceLineInfo::trajectory() const {
return discretized_trajectory_;
}
void ReferenceLineInfo::SetStopPoint(const StopPoint& stop_point) {
void ReferenceLineInfo::SetLatticeStopPoint(const StopPoint& stop_point) {
planning_target_.mutable_stop_point()->CopyFrom(stop_point);
}
void ReferenceLineInfo::SetCruiseSpeed(double speed) {
void ReferenceLineInfo::SetLatticeCruiseSpeed(double speed) {
planning_target_.set_cruise_speed(speed);
}
......
......@@ -85,10 +85,13 @@ class ReferenceLineInfo {
double PriorityCost() const { return priority_cost_; }
void SetPriorityCost(double cost) { priority_cost_ = cost; }
// For lattice planner'speed planning target
void SetStopPoint(const StopPoint& stop_point);
void SetCruiseSpeed(double speed);
void SetLatticeStopPoint(const StopPoint& stop_point);
void SetLatticeCruiseSpeed(double speed);
const PlanningTarget& planning_target() const { return planning_target_; }
void SetCruiseSpeed(double speed) { cruise_speed_ = speed; }
const double GetCruiseSpeed() const { return cruise_speed_; }
hdmap::LaneInfoConstPtr LocateLaneInfo(const double s) const;
bool GetNeighborLaneInfo(const ReferenceLineInfo::LaneType lane_type,
......@@ -322,6 +325,8 @@ class ReferenceLineInfo {
common::VehicleSignal vehicle_signal_;
double cruise_speed_;
DISALLOW_COPY_AND_ASSIGN(ReferenceLineInfo);
};
......
......@@ -173,7 +173,7 @@ Status LatticePlanner::PlanOnReferenceLine(
double speed_limit =
reference_line_info->reference_line().GetSpeedLimitFromS(init_s[0]);
reference_line_info->SetCruiseSpeed(speed_limit);
reference_line_info->SetLatticeCruiseSpeed(speed_limit);
PlanningTarget planning_target = reference_line_info->planning_target();
if (planning_target.has_stop_point()) {
......
......@@ -132,7 +132,7 @@ void TrafficDecider::BuildPlanningTarget(
vehicle_config.vehicle_param().front_edge_to_center();
stop_point.set_s(min_s - front_edge_to_center +
FLAGS_virtual_stop_wall_length / 2.0);
reference_line_info->SetStopPoint(stop_point);
reference_line_info->SetLatticeStopPoint(stop_point);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册