|
Formula Student Autonomous Systems
The code for the main driverless system
|
#include "adapter_planning/vehicle.hpp"#include "common_lib/communication/interfaces.hpp"#include "planning/planning.hpp"#include "test_utils/utils.hpp"
Go to the source code of this file.
Classes | |
| class | IntegrationTest |
Functions | |
| TEST_F (IntegrationTest, PUBLISH_PATH1) | |
| Tests the full pipeline with a simple track of 24 cones placed in two straight lines parallel to the x-axis. | |
| TEST_F (IntegrationTest, PUBLISH_PATH2) | |
| test the full pipeline with a straight track of 24 cones oriented at 45 degrees with the x-axis. | |
| TEST_F (IntegrationTest, PUBLISH_PATH3) | |
| test the full pipeline with a straight track of 24 cones oriented at 135 degrees with the x-axis. | |
| TEST_F (IntegrationTest, PUBLISH_PATH4) | |
| test the full pipeline with a straight track of 24 cones oriented at 225 degrees with the x-axis. | |
| TEST_F (IntegrationTest, PUBLISH_PATH5) | |
| test the full pipeline with a straight track of 24 cones oriented at 315 degrees with the x-axis. | |
| TEST_F (IntegrationTest, PUBLISH_PATH6) | |
| test the full pipeline with a straight track of 24 cones oriented at 90 degrees with the x-axis (parallel to the y-axis). | |
| TEST_F (IntegrationTest, no_cones) | |
| Tests the full pipeline when 0 cones are sent. | |
| TEST_F (IntegrationTest, one_cone) | |
| Tests the full pipeline when only a single cone is sent. | |
| void | read_from_file (std::ifstream &file, double &finalxi, double &finalxf, double &finalyi, double &finalyf, std::vector< Cone > &cone_array, custom_interfaces::msg::Pose &vehicle_pose) |
| Reads a file and processes its contents to initialize vehicle state, cones, and final position range. | |
| void | save_debug_file (const std::string filename, const std::vector< Cone > cone_array, const custom_interfaces::msg::PathPointArray received_path, const custom_interfaces::msg::Pose vehicle_pose) |
| Saves debug information to a file. | |
| TEST_F (IntegrationTest, simple_straight_path) | |
| Tests the full pipeline with a simple straight path. | |
| TEST_F (IntegrationTest, unbalanced_STRAIGHT_PATH) | |
| Tests the full pipeline in a straight line with fewer cones in one and more in the other. | |
| TEST_F (IntegrationTest, FULL_CURVE_PATH) | |
| Tests the full pipeline in a straight line with fewer cones. | |
| TEST_F (IntegrationTest, CURVES_AND_CLOSE_TRACKSIDES) | |
| A path with curves where one side of the track is close to other part of the track. | |
| TEST_F (IntegrationTest, SHARP_SINOSOIDAL_CURVE) | |
| A path with a sharp sinosoidal curve, where cones on both sides get closer. | |
| TEST_F (IntegrationTest, ROSBAG_PATH_1) | |
| Testing a scenario from rosbag Autocross_DV-5. | |
| TEST_F (IntegrationTest, ROSBAG_PATH_2) | |
| Testing a scenario from rosbag ZigZag_DV-11. | |
| TEST_F (IntegrationTest, ROSBAG_PATH_3) | |
| Testing a scenario from rosbag Acceleration_Testing_DV-1B. | |
| TEST_F (IntegrationTest, ROSBAG_PATH_4) | |
| Testing a scenario from rosbag Hard_Course-DV-3 from the beggining of the track. | |
| TEST_F (IntegrationTest, ROSBAG_PATH_5) | |
| Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position. | |
| TEST_F (IntegrationTest, CIRCLE) | |
| Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position. | |
| TEST_F (IntegrationTest, STRAIGHT_3) | |
| Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position. | |
| TEST_F (IntegrationTest, TRACK) | |
| Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position. | |
| TEST_F (IntegrationTest, TRACK_2) | |
| Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position. | |
| TEST_F (IntegrationTest, OUTLIERS_1) | |
| Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position. | |
| TEST_F (IntegrationTest, OUTLIERS_2) | |
| Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position. | |
| void read_from_file | ( | std::ifstream & | file, |
| double & | finalxi, | ||
| double & | finalxf, | ||
| double & | finalyi, | ||
| double & | finalyf, | ||
| std::vector< Cone > & | cone_array, | ||
| custom_interfaces::msg::Pose & | vehicle_pose | ||
| ) |
Reads a file and processes its contents to initialize vehicle state, cones, and final position range.
This function reads lines from the provided file stream and processes them based on specific flags:
| file | The input file stream to read from. |
| finalxi | Reference to the variable to store the initial x-coordinate of the final position range. |
| finalxf | Reference to the variable to store the final x-coordinate of the final position range. |
| finalyi | Reference to the variable to store the initial y-coordinate of the final position range. |
| finalyf | Reference to the variable to store the final y-coordinate of the final position range. |
| cone_array | Reference to the vector to store the cones read from the file. |
| vehicle_pose | Reference to the Pose object to store the initial vehicle state. |
Definition at line 358 of file integration_tests.cpp.


| void save_debug_file | ( | const std::string | filename, |
| const std::vector< Cone > | cone_array, | ||
| const custom_interfaces::msg::PathPointArray | received_path, | ||
| const custom_interfaces::msg::Pose | vehicle_pose | ||
| ) |
Saves debug information to a file.
This function writes the received path points, cone array, and vehicle state to a specified debug file. The file is saved in the directory "../../src/planning/test/integration_tests/results/" with the given filename.
| filename | The name of the file to save the debug information. |
| cone_array | A vector of Cone objects representing the cone positions and colors. |
| received_path | A PathPointArray message containing the path points. |
| vehicle_pose | A Pose message containing the vehicle's position and orientation. |
Definition at line 398 of file integration_tests.cpp.


| TEST_F | ( | IntegrationTest | , |
| CIRCLE | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position.
Definition at line 867 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| CURVES_AND_CLOSE_TRACKSIDES | |||
| ) |
A path with curves where one side of the track is close to other part of the track.
Definition at line 558 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| FULL_CURVE_PATH | |||
| ) |
Tests the full pipeline in a straight line with fewer cones.
Definition at line 513 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| no_cones | |||
| ) |
Tests the full pipeline when 0 cones are sent.
Definition at line 301 of file integration_tests.cpp.
| TEST_F | ( | IntegrationTest | , |
| one_cone | |||
| ) |
Tests the full pipeline when only a single cone is sent.
Definition at line 320 of file integration_tests.cpp.
| TEST_F | ( | IntegrationTest | , |
| OUTLIERS_1 | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position.
Definition at line 1044 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| OUTLIERS_2 | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position.
Definition at line 1088 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| PUBLISH_PATH1 | |||
| ) |
Tests the full pipeline with a simple track of 24 cones placed in two straight lines parallel to the x-axis.
The result should be a path of points contained in the x-axis.
Definition at line 93 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| PUBLISH_PATH2 | |||
| ) |
test the full pipeline with a straight track of 24 cones oriented at 45 degrees with the x-axis.
Definition at line 124 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| PUBLISH_PATH3 | |||
| ) |
test the full pipeline with a straight track of 24 cones oriented at 135 degrees with the x-axis.
Definition at line 161 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| PUBLISH_PATH4 | |||
| ) |
test the full pipeline with a straight track of 24 cones oriented at 225 degrees with the x-axis.
Definition at line 199 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| PUBLISH_PATH5 | |||
| ) |
test the full pipeline with a straight track of 24 cones oriented at 315 degrees with the x-axis.
Definition at line 235 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| PUBLISH_PATH6 | |||
| ) |
test the full pipeline with a straight track of 24 cones oriented at 90 degrees with the x-axis (parallel to the y-axis).
Definition at line 271 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| ROSBAG_PATH_1 | |||
| ) |
Testing a scenario from rosbag Autocross_DV-5.
Definition at line 646 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| ROSBAG_PATH_2 | |||
| ) |
Testing a scenario from rosbag ZigZag_DV-11.
Definition at line 690 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| ROSBAG_PATH_3 | |||
| ) |
Testing a scenario from rosbag Acceleration_Testing_DV-1B.
Definition at line 735 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| ROSBAG_PATH_4 | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 from the beggining of the track.
Definition at line 779 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| ROSBAG_PATH_5 | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position.
Definition at line 823 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| SHARP_SINOSOIDAL_CURVE | |||
| ) |
A path with a sharp sinosoidal curve, where cones on both sides get closer.
Definition at line 602 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| simple_straight_path | |||
| ) |
Tests the full pipeline with a simple straight path.
Definition at line 424 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| STRAIGHT_3 | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position.
Definition at line 911 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| TRACK | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position.
Definition at line 956 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| TRACK_2 | |||
| ) |
Testing a scenario from rosbag Hard_Course-DV-3 with a different initial position.
Definition at line 1000 of file integration_tests.cpp.

| TEST_F | ( | IntegrationTest | , |
| unbalanced_STRAIGHT_PATH | |||
| ) |
Tests the full pipeline in a straight line with fewer cones in one and more in the other.
Definition at line 469 of file integration_tests.cpp.
