8 std::string file_path =
"src/planning/tracks/velocity1.txt";
10 std::vector<common_lib::structures::PathPoint> final_path =
::path_from_file(file_path);
13 EXPECT_EQ((
int)final_path.size(), 14);
14 EXPECT_EQ(final_path.back().ideal_velocity, 3);
22 std::string file_path =
"src/planning/tracks/velocity1.txt";
24 std::vector<common_lib::structures::PathPoint> final_path =
::path_from_file(file_path);
27 for (
const auto& point : final_path) {
28 EXPECT_TRUE(point.ideal_velocity >= 3);
38 std::string file_path =
"src/planning/tracks/velocity2.txt";
40 std::vector<common_lib::structures::PathPoint> final_path =
::path_from_file(file_path);
43 EXPECT_EQ((
int)final_path.size(), 1);
44 EXPECT_EQ(final_path[0].ideal_velocity, 3);
53 std::string file_path =
"src/planning/tracks/velocity3.txt";
55 std::vector<common_lib::structures::PathPoint> final_path =
::path_from_file(file_path);
58 EXPECT_EQ((
int)final_path.size(), 0);
Computes velocity profiles for a planned path based on curvature and dynamics constraints.
void set_velocity(std::vector< PathPoint > &final_path)
Assigns an velocity to each point of the path.
std::vector< common_lib::structures::PathPoint > path_from_file(const std::string &path)
Retrieves a path point vector from a file.
TEST(VelocityPlanning, velocity0)
simple scenario with few points in the path