8 std::string file_path =
"src/planning/tracks/path_smooth1.txt";
10 Pose car_pose = {0, 0, 0};
11 std::vector<common_lib::structures::PathPoint> input_path =
::path_from_file(file_path);
12 std::vector<common_lib::structures::PathPoint> smoothed_path =
14 EXPECT_EQ((
int)smoothed_path.size(), 110);
22 std::string file_path =
"src/planning/tracks/path_smooth2.txt";
24 Pose car_pose = {0, 0, 0};
25 std::vector<common_lib::structures::PathPoint> input_path =
::path_from_file(file_path);
26 std::vector<common_lib::structures::PathPoint> smoothed_path =
28 EXPECT_EQ((
int)smoothed_path.size(), 380);
class that defines the path smoothing algorithm
std::vector< PathPoint > smooth_path(const std::vector< PathPoint > &path, bool is_path_closed) const
Smooths a path by fitting a B-spline through the input points.
std::vector< common_lib::structures::PathPoint > path_from_file(const std::string &path)
Retrieves a path point vector from a file.
TEST(PathSmoothing, path_smooth1)
simple scenario with few points in the path