161 {
162 google::InitGoogleLogging(argv[0]);
163 google::ParseCommandLineFlags(&argc, &argv, true);
164
165 if (FLAGS_input_file.empty()) {
166 AERROR <<
"need to provide --input_file";
167 return 0;
168 }
169
170 std::vector<Eigen::Vector2d> raw_points =
172 FLAGS_input_file);
173
174 std::vector<apollo::common::PathPoint> smooth_points;
175 auto res =
177 if (!res) {
178 AERROR <<
"Failed to smooth a the line";
179 }
180
181 if (FLAGS_output_file.empty()) {
182 FLAGS_output_file = FLAGS_input_file + ".smoothed";
183 AINFO <<
"Output file not provided, set to: " << FLAGS_output_file;
184 }
186 smooth_points);
187 return 0;
188}
static bool Smooth(std::vector< Eigen::Vector2d > raw_points, std::vector< common::PathPoint > *ptr_smooth_points)
static void Export(const std::string &filename, const std::vector< common::PathPoint > &smoothed_points)
static std::vector< Eigen::Vector2d > ReadCoordinatesFromFile(const std::string &filename)