提交 f928a544 编写于 作者: L liyunADU 提交者: Yajia Zhang

Add switch for new reference line

Integrate new reference line
上级 2823096a
......@@ -52,6 +52,9 @@ DEFINE_double(look_forward_time_sec, 8,
DEFINE_bool(enable_smooth_reference_line, true,
"enable smooth the map reference line");
DEFINE_bool(enable_spiral_reference_line, false,
"enable new spiral based reference line");
DEFINE_int32(max_history_frame_num, 5, "The maximum history frame number");
DEFINE_double(max_collision_distance, 0.1,
......
......@@ -31,6 +31,7 @@ DECLARE_double(look_forward_min_distance);
DECLARE_double(look_forward_time_sec);
DECLARE_bool(enable_smooth_reference_line);
DECLARE_bool(enable_spiral_reference_line);
DECLARE_double(max_collision_distance);
DECLARE_bool(publish_estop);
DECLARE_bool(enable_trajectory_stitcher);
......
--flagfile=modules/common/data/global_flagfile.txt
--nouse_ros_time
--planning_upper_speed_limit=31.3
--noenable_spiral_reference_line
......@@ -57,6 +57,7 @@ cc_library(
deps = [
"reference_line",
"reference_line_smoother",
"spiral_reference_line_smoother",
"//modules/map/pnc_map",
],
)
......
......@@ -148,6 +148,10 @@ bool ReferenceLineProvider::CreateReferenceLineFromRouting(
ReferenceLineSmoother smoother;
smoother.Init(smoother_config_);
SpiralReferenceLineSmoother spiral_smoother;
double max_spiral_smoother_dev = 0.1;
spiral_smoother.set_max_point_deviation(max_spiral_smoother_dev);
std::vector<ReferenceLine> reference_lines;
std::vector<hdmap::RouteSegments> segments;
for (const auto &lanes : route_segments) {
......@@ -156,10 +160,17 @@ bool ReferenceLineProvider::CreateReferenceLineFromRouting(
if (FLAGS_enable_smooth_reference_line) {
ReferenceLine raw_reference_line(hdmap_path);
ReferenceLine reference_line;
if (!smoother.Smooth(raw_reference_line, &reference_line,
spline_solver_.get())) {
AERROR << "Failed to smooth reference line";
continue;
if (FLAGS_enable_spiral_reference_line) {
if (!spiral_smoother.Smooth(raw_reference_line,
&reference_line)) {
AERROR << "Failed to smooth reference_line with spiral smoother";
}
} else {
if (!smoother.Smooth(raw_reference_line, &reference_line,
spline_solver_.get())) {
AERROR << "Failed to smooth reference line";
continue;
}
}
bool is_valid_reference_line = true;
......
......@@ -33,6 +33,7 @@
#include "modules/planning/math/smoothing_spline/spline_2d_solver.h"
#include "modules/planning/reference_line/reference_line.h"
#include "modules/planning/reference_line/reference_line_smoother.h"
#include "modules/planning/reference_line/spiral_reference_line_smoother.h"
/**
* @namespace apollo::planning
......
......@@ -106,7 +106,8 @@ bool SpiralReferenceLineSmoother::Smooth(
// app->Options()->SetNumericValue("derivative_test_perturbation", 1.0e-7);
// app->Options()->SetStringValue("derivative_test", "second-order");
app->Options()->SetIntegerValue("print_level", 0);
app->Options()->SetIntegerValue("max_iter", 1000);
int num_iterations = 10;
app->Options()->SetIntegerValue("max_iter", num_iterations);
// app->Options()->SetNumericValue("acceptable_tol", 0.5);
// app->Options()->SetNumericValue("acceptable_obj_change_tol", 0.5);
......
......@@ -6,7 +6,11 @@ cc_library(
name = "ipopt",
includes = ["."],
linkopts = [
"-lcoinmumps",
"-lipopt",
"-L/usr/local/ipopt/lib -lipopt",
"-L/usr/local/ipopt/lib -lcoinmumps",
"-lblas",
"-llapack",
"-ldl",
"-lgfortran",
],
)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册