8#include "gtest/gtest.h"
16TEST(PointSolverTests, Test_update_closest_point_1) {
25 auto [path, rear_axis_point, closest_point_velocity] =
28 EXPECT_EQ(path.x, expected_point.
x);
29 EXPECT_EQ(path.y, expected_point.
y);
30 EXPECT_EQ(rear_axis_point, expected_id);
37TEST(PointSolverTests, Test_update_lookahead_point_1) {
41 int closest_point_id = 76;
44 auto [result_point, result_velocity, result_error] =
47 EXPECT_NEAR(result_point.x, expected_point.
x, 0.01);
48 EXPECT_NEAR(result_point.y, expected_point.
y, 0.01);
49 EXPECT_FALSE(result_error);
std::tuple< common_lib::structures::Position, int, double > get_closest_point(const std::vector< custom_interfaces::msg::PathPoint > &pathpoint_array, const common_lib::structures::Position &position)
Find the closest point on the path.
std::tuple< common_lib::structures::Position, double, bool > get_lookahead_point(const std::vector< custom_interfaces::msg::PathPoint > &pathpoint_array, int closest_point_id, double lookahead_distance, common_lib::structures::Position rear_axis_position, double last_to_first_max_dist)
Update Lookahead point.
std::vector< custom_interfaces::msg::PathPoint > create_path_msg(std::string track_file)
Reads track files and creates a PathPointArray message.
TEST(PointSolverTests, Test_update_closest_point_1)
Test Point Solver - get_closest_point()
double pure_pursuit_lookahead_gain_
double pure_pursuit_lookahead_minimum_
double first_last_max_dist_