Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
PerceptionIntegrationTest Class Reference

Test class for blackbox perception integration tests. More...

Inheritance diagram for PerceptionIntegrationTest:
Inheritance graph
Collaboration diagram for PerceptionIntegrationTest:
Collaboration graph

Protected Member Functions

void SetUp () override
 Flag that determines if the cones were recieved on the test node side.
 
void TearDown () override
 
void publish_pcd (const std::string &input_pcd_path)
 
bool waitForCones (rclcpp::executors::SingleThreadedExecutor &executor, int timeout_sec=2)
 
void writeResults (std::string output_pcd_path, int cone_gt, int large_cone_gt)
 
void runTest (const std::string test_name, const int cone_gt, const int large_cone_gt, const int min_correctness, const uint8_t mission)
 

Protected Attributes

rclcpp::Node::SharedPtr test_node_
 
rclcpp::Publisher< sensor_msgs::msg::PointCloud2 >::SharedPtr pcl_publisher_
 Test node created to publish a pcl and subsribe to the cones array on the perception node.
 
rclcpp::Subscription< custom_interfaces::msg::PerceptionOutput >::SharedPtr cones_subscriber_
 
rclcpp::Subscription< sensor_msgs::msg::PointCloud2 >::SharedPtr pcl_removed_cloud_subscriber_
 
custom_interfaces::msg::ConeArray::SharedPtr cones_result_
 
pcl::PointCloud< pcl::PointXYZI >::Ptr result_cloud_
 Recieves and stores perception node output.
 
bool cones_received_
 Cloud that will be filled with the found cones as cylinders and saved in the results file for visualization.
 

Detailed Description

Test class for blackbox perception integration tests.

(When using pcd-viewer or other extension the result clouds only update after they are manually reset)

Definition at line 95 of file perception_integration_tests.cpp.

Member Function Documentation

◆ publish_pcd()

void PerceptionIntegrationTest::publish_pcd ( const std::string &  input_pcd_path)
inlineprotected

Definition at line 142 of file perception_integration_tests.cpp.

Here is the caller graph for this function:

◆ runTest()

void PerceptionIntegrationTest::runTest ( const std::string  test_name,
const int  cone_gt,
const int  large_cone_gt,
const int  min_correctness,
const uint8_t  mission 
)
inlineprotected

Definition at line 199 of file perception_integration_tests.cpp.

Here is the call graph for this function:

◆ SetUp()

void PerceptionIntegrationTest::SetUp ( )
inlineoverrideprotected

Flag that determines if the cones were recieved on the test node side.

Setup publishers, subscribers and helper functions.

Definition at line 112 of file perception_integration_tests.cpp.

◆ TearDown()

void PerceptionIntegrationTest::TearDown ( )
inlineoverrideprotected

Definition at line 140 of file perception_integration_tests.cpp.

◆ waitForCones()

bool PerceptionIntegrationTest::waitForCones ( rclcpp::executors::SingleThreadedExecutor &  executor,
int  timeout_sec = 2 
)
inlineprotected

Definition at line 158 of file perception_integration_tests.cpp.

Here is the caller graph for this function:

◆ writeResults()

void PerceptionIntegrationTest::writeResults ( std::string  output_pcd_path,
int  cone_gt,
int  large_cone_gt 
)
inlineprotected

Definition at line 168 of file perception_integration_tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ cones_received_

bool PerceptionIntegrationTest::cones_received_
protected

Cloud that will be filled with the found cones as cylinders and saved in the results file for visualization.

Definition at line 107 of file perception_integration_tests.cpp.

◆ cones_result_

custom_interfaces::msg::ConeArray::SharedPtr PerceptionIntegrationTest::cones_result_
protected

Definition at line 103 of file perception_integration_tests.cpp.

◆ cones_subscriber_

rclcpp::Subscription<custom_interfaces::msg::PerceptionOutput>::SharedPtr PerceptionIntegrationTest::cones_subscriber_
protected

Definition at line 100 of file perception_integration_tests.cpp.

◆ pcl_publisher_

rclcpp::Publisher<sensor_msgs::msg::PointCloud2>::SharedPtr PerceptionIntegrationTest::pcl_publisher_
protected

Test node created to publish a pcl and subsribe to the cones array on the perception node.

Definition at line 99 of file perception_integration_tests.cpp.

◆ pcl_removed_cloud_subscriber_

rclcpp::Subscription<sensor_msgs::msg::PointCloud2>::SharedPtr PerceptionIntegrationTest::pcl_removed_cloud_subscriber_
protected

Definition at line 101 of file perception_integration_tests.cpp.

◆ result_cloud_

pcl::PointCloud<pcl::PointXYZI>::Ptr PerceptionIntegrationTest::result_cloud_
protected

Recieves and stores perception node output.

Definition at line 105 of file perception_integration_tests.cpp.

◆ test_node_

rclcpp::Node::SharedPtr PerceptionIntegrationTest::test_node_
protected

Definition at line 97 of file perception_integration_tests.cpp.


The documentation for this class was generated from the following file: