Apollo 11.0
自动驾驶开放平台
spiral_smoother_util.cc 文件参考
spiral_smoother_util.cc 的引用(Include)关系图:

浏览源代码.

类

class  apollo::planning::SpiralSmootherUtil
 

命名空间

namespace  apollo
 class register implement
 
namespace  apollo::planning
 apollo::planning
 

函数

 DEFINE_string (input_file, "", "input file with format x,y per line")
 
 DEFINE_string (output_file, "", "output file with format x,y per line")
 
 DEFINE_double (smooth_length, 200.0, "Smooth this amount of length ")
 
 DEFINE_double (minimum_point_spacing, 5.0, "The minimum distance for input points.")
 
int main (int argc, char *argv[])
 

函数说明

◆ DEFINE_double() [1/2]

DEFINE_double ( minimum_point_spacing  ,
5.  0,
"The minimum distance for input points."   
)

◆ DEFINE_double() [2/2]

DEFINE_double ( smooth_length  ,
200.  0,
"Smooth this amount of length "   
)

◆ DEFINE_string() [1/2]

DEFINE_string ( input_file  ,
""  ,
"input file with format  x,
y per line"   
)

◆ DEFINE_string() [2/2]

DEFINE_string ( output_file  ,
""  ,
"output file with format  x,
y per line"   
)

◆ main()

int main ( int  argc,
char *  argv[] 
)

在文件 spiral_smoother_util.cc 第 161 行定义.

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 =
176 apollo::planning::SpiralSmootherUtil::Smooth(raw_points, &smooth_points);
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)
#define AERROR
Definition log.h:44
#define AINFO
Definition log.h:42