|
Formula Student Autonomous Systems
The code for the main driverless system
|
#include <gtest/gtest.h>#include <pcl/io/pcd_io.h>#include <pcl/point_cloud.h>#include <pcl_conversions/pcl_conversions.h>#include <custom_interfaces/msg/cone_array.hpp>#include <custom_interfaces/msg/perception_output.hpp>#include <filesystem>#include <rclcpp/rclcpp.hpp>#include <sensor_msgs/msg/point_cloud2.hpp>#include "perception/perception_node.hpp"
Go to the source code of this file.
Classes | |
| class | PerceptionIntegrationTest |
| Test class for blackbox perception integration tests. More... | |
Functions | |
| bool | loadGroundTruth (const std::string &file_path, std::vector< std::tuple< float, float, bool, bool > > &ground_truth) |
| Helper function to load ground truth cone positions from a file. | |
| double | computeCorrectness (const custom_interfaces::msg::ConeArray::SharedPtr &detected, std::vector< std::tuple< float, float, bool, bool > > ground_truth, float tolerance=0.2) |
| Helper function to compute correctness for a specific test case. | |
| void | generateCylinder (pcl::PointCloud< pcl::PointXYZI >::Ptr cloud, float radius, float height, float centerX, float centerY, int numSlices, int numHeightSegments, float intensity) |
| Generates a cylinder made of pcl points, used to add the found cones in the results pcl. | |
| TEST_F (PerceptionIntegrationTest, StraightLine) | |
| Straight line test for perception node from rosbag: Accelaration_Testing_DV_1B.mcap. | |
| TEST_F (PerceptionIntegrationTest, AccelerationEndClose) | |
| Close to accelaration end test for perception node from rosbag: Accelaration_Testing_Manual-4.mcap. | |
| TEST_F (PerceptionIntegrationTest, AccelerationEndMedium) | |
| Medium distance to accelaration end test for perception node from rosbag: Accelaration_Testing_Manual-4.mcap. | |
| TEST_F (PerceptionIntegrationTest, AccelerationFar) | |
| Far distance to accelaration end test for perception node from rosbag: Accelaration_Testing_Manual-4.mcap. | |
| TEST_F (PerceptionIntegrationTest, EnterHairpin) | |
| Blind turn test for perception node from rosbag: Closed_Course_Manual-6.mcap. | |
| TEST_F (PerceptionIntegrationTest, TurnStart) | |
| Turn test for perception node from rosbag: Hard_Course-DV-5.mcap. | |
| TEST_F (PerceptionIntegrationTest, OddStituation) | |
| Odd situation test for perception node from rosbag: Hard_Course-DV-5.mcap. | |
| TEST_F (PerceptionIntegrationTest, DiagonalPath) | |
| A fully diagonal path test for perception node from rosbag: Autocross_DV-1.mcap. | |
| double computeCorrectness | ( | const custom_interfaces::msg::ConeArray::SharedPtr & | detected, |
| std::vector< std::tuple< float, float, bool, bool > > | ground_truth, | ||
| float | tolerance = 0.2 |
||
| ) |
Helper function to compute correctness for a specific test case.
Definition at line 35 of file perception_integration_tests.cpp.

| void generateCylinder | ( | pcl::PointCloud< pcl::PointXYZI >::Ptr | cloud, |
| float | radius, | ||
| float | height, | ||
| float | centerX, | ||
| float | centerY, | ||
| int | numSlices, | ||
| int | numHeightSegments, | ||
| float | intensity | ||
| ) |
Generates a cylinder made of pcl points, used to add the found cones in the results pcl.
Definition at line 76 of file perception_integration_tests.cpp.

| bool loadGroundTruth | ( | const std::string & | file_path, |
| std::vector< std::tuple< float, float, bool, bool > > & | ground_truth | ||
| ) |
Helper function to load ground truth cone positions from a file.
Definition at line 18 of file perception_integration_tests.cpp.

| TEST_F | ( | PerceptionIntegrationTest | , |
| AccelerationEndClose | |||
| ) |
Close to accelaration end test for perception node from rosbag: Accelaration_Testing_Manual-4.mcap.
Definition at line 258 of file perception_integration_tests.cpp.
| TEST_F | ( | PerceptionIntegrationTest | , |
| AccelerationEndMedium | |||
| ) |
Medium distance to accelaration end test for perception node from rosbag: Accelaration_Testing_Manual-4.mcap.
Definition at line 266 of file perception_integration_tests.cpp.
| TEST_F | ( | PerceptionIntegrationTest | , |
| AccelerationFar | |||
| ) |
Far distance to accelaration end test for perception node from rosbag: Accelaration_Testing_Manual-4.mcap.
Definition at line 274 of file perception_integration_tests.cpp.
| TEST_F | ( | PerceptionIntegrationTest | , |
| DiagonalPath | |||
| ) |
A fully diagonal path test for perception node from rosbag: Autocross_DV-1.mcap.
Definition at line 296 of file perception_integration_tests.cpp.
| TEST_F | ( | PerceptionIntegrationTest | , |
| EnterHairpin | |||
| ) |
Blind turn test for perception node from rosbag: Closed_Course_Manual-6.mcap.
Definition at line 281 of file perception_integration_tests.cpp.
| TEST_F | ( | PerceptionIntegrationTest | , |
| OddStituation | |||
| ) |
Odd situation test for perception node from rosbag: Hard_Course-DV-5.mcap.
Definition at line 291 of file perception_integration_tests.cpp.
| TEST_F | ( | PerceptionIntegrationTest | , |
| StraightLine | |||
| ) |
Straight line test for perception node from rosbag: Accelaration_Testing_DV_1B.mcap.
Definition at line 252 of file perception_integration_tests.cpp.
| TEST_F | ( | PerceptionIntegrationTest | , |
| TurnStart | |||
| ) |
Turn test for perception node from rosbag: Hard_Course-DV-5.mcap.
Definition at line 286 of file perception_integration_tests.cpp.