提交 1ef9e74f 编写于 作者: J Jiangtao Hu 提交者: Yifei Jiang

planning: change following distance only considers ADC speed.

上级 8f3d5aae
......@@ -113,6 +113,9 @@ DEFINE_double(nudge_distance_obstacle, 0.3,
"minimum distance to nudge a obstacle (meters)");
DEFINE_double(follow_min_distance, 10,
"min follow distance for vehicles/bicycles/moving objects");
DEFINE_double(
follow_time_buffer, 4.0,
"follow time buffer (in second) to calculate the following distance.");
DEFINE_double(stop_line_min_distance, 0.0,
"min distance (meters) to stop line for a valid stop");
......
......@@ -75,6 +75,8 @@ DECLARE_double(stop_distance_destination);
DECLARE_double(min_driving_width);
DECLARE_double(nudge_distance_obstacle);
DECLARE_double(follow_min_distance);
DECLARE_double(follow_time_buffer);
DECLARE_double(stop_line_min_distance);
DECLARE_string(destination_obstacle_id);
......
......@@ -496,13 +496,9 @@ bool DpStGraph::CreateFollowDecision(
auto* follow = follow_decision->mutable_follow();
// in seconds
constexpr double kFollowTimeBuffer = 4.0;
const auto& velocity = path_obstacle.obstacle()->Perception().velocity();
const double follow_speed =
std::fmax(init_point_.v(), std::hypot(velocity.x(), velocity.y()));
const double follow_speed = init_point_.v();
const double follow_distance_s =
-std::fmax(follow_speed * kFollowTimeBuffer, FLAGS_follow_min_distance);
-std::fmax(follow_speed * FLAGS_follow_time_buffer, FLAGS_follow_min_distance);
follow->set_distance_s(follow_distance_s);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册