提交 36b7b2f8 编写于 作者: Z Zhang Liangliang 提交者: Dong Li

PncMap: fixed nearest laywaypoint bug in get lane segments from routing.

上级 9742bb21
......@@ -232,7 +232,8 @@ bool PncMap::GetLaneSegmentsFromRouting(
AERROR << "Failed to find point on routing. Point:" << point.DebugString();
return false;
}
const auto &start_waypoint = nearest_waypoints[0];
const auto &start_waypoint = nearest_waypoints.back();
double min_overlap_distance = std::numeric_limits<double>::infinity();
double proj_s = 0.0;
double accumulate_s = 0.0;
......@@ -476,9 +477,7 @@ bool PncMap::CreatePathFromLaneSegments(const LaneSegments &segments,
return true;
}
const HDMap &PncMap::HDMap() const {
return hdmap_;
}
const HDMap &PncMap::HDMap() const { return hdmap_; }
} // namespace hdmap
} // namespace apollo
......@@ -33,7 +33,7 @@ DEFINE_double(trajectory_resolution, 0.01,
"output trajectory.");
DEFINE_double(
look_backward_distance, 30,
look_backward_distance, 10,
"look backward this distance when creating reference line from routing");
DEFINE_double(
......
......@@ -74,7 +74,7 @@ TEST_F(ReferenceLineSmootherTest, smooth) {
ReferenceLine smoothed_reference_line;
EXPECT_FLOAT_EQ(153.87421, reference_line_->Length());
EXPECT_TRUE(smoother_.Smooth(*reference_line_, &smoothed_reference_line));
EXPECT_FLOAT_EQ(153.64909, smoothed_reference_line.Length());
EXPECT_FLOAT_EQ(153.6006, smoothed_reference_line.Length());
}
} // namespace planning
......
--adapter_config_path=modules/planning/conf/adapter.conf
\ No newline at end of file
--adapter_config_path=modules/planning/conf/adapter.conf
--nouse_ros_time
--noalign_prediction_time
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册