Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
ransac_test.cpp File Reference
#include "ground_removal/ransac.hpp"
#include <gtest/gtest.h>
#include <memory>
#include <test_utils/pointcloud2_helper.hpp>
#include <utils/plane.hpp>
Include dependency graph for ransac_test.cpp:

Go to the source code of this file.

Classes

class  RANSACTest
 Test class for setting up data and testing RANSAC algorithm. More...
 

Functions

 TEST_F (RANSACTest, TestBigEpsilon)
 Test Scenario: All points fit in the model.
 
 TEST_F (RANSACTest, TestCommonScenario)
 Test Scenario: Only points that fit into the plane are considered as part of the plane.
 
 TEST_F (RANSACTest, TestCommonScenario2)
 Test Scenario: The points in the plane and a close enough point is removed - 1 point left.
 
 TEST_F (RANSACTest, TestThresholdZero)
 Test Scenario: The epsilon threshold is set to 0 - No points are removed.
 
 TEST_F (RANSACTest, TestZeroRepetitions)
 Test Scenario: Number of repetitions is set to 0 - Expected a point cloud with 0 points.
 
 TEST_F (RANSACTest, TestSmallEpsilon)
 Test Scenario: Really small threshold.
 
 TEST_F (RANSACTest, TestBigEpsilon2)
 Test Scenario: Really great threshold - All points are considered as part of the plane.
 
 TEST_F (RANSACTest, TestCommonScenario3Points)
 Test Scenario: Point cloud with only 3 points: 0 points are expected after the ground removal.
 
 TEST_F (RANSACTest, Test3PointsThresholdZero)
 Test Scenario: Point cloud with only 3 points: The epsilon threshold is set to 0 - No points are removed.
 
 TEST_F (RANSACTest, TestEmptyPointCloud)
 Test Scenario: Point cloud with 0 points - Must return a point cloud with 0 points also.
 
 TEST_F (RANSACTest, TestEmptyPointCloud2)
 Test Scenario: Point cloud with 0 points.
 

Function Documentation

◆ TEST_F() [1/11]

TEST_F ( RANSACTest  ,
Test3PointsThresholdZero   
)

Test Scenario: Point cloud with only 3 points: The epsilon threshold is set to 0 - No points are removed.

Definition at line 135 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [2/11]

TEST_F ( RANSACTest  ,
TestBigEpsilon   
)

Test Scenario: All points fit in the model.

Definition at line 36 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [3/11]

TEST_F ( RANSACTest  ,
TestBigEpsilon2   
)

Test Scenario: Really great threshold - All points are considered as part of the plane.

Definition at line 109 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [4/11]

TEST_F ( RANSACTest  ,
TestCommonScenario   
)

Test Scenario: Only points that fit into the plane are considered as part of the plane.

Definition at line 48 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [5/11]

TEST_F ( RANSACTest  ,
TestCommonScenario2   
)

Test Scenario: The points in the plane and a close enough point is removed - 1 point left.

Definition at line 60 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [6/11]

TEST_F ( RANSACTest  ,
TestCommonScenario3Points   
)

Test Scenario: Point cloud with only 3 points: 0 points are expected after the ground removal.

Definition at line 122 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [7/11]

TEST_F ( RANSACTest  ,
TestEmptyPointCloud   
)

Test Scenario: Point cloud with 0 points - Must return a point cloud with 0 points also.

Definition at line 147 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [8/11]

TEST_F ( RANSACTest  ,
TestEmptyPointCloud2   
)

Test Scenario: Point cloud with 0 points.

Epsilon and repetitions set to 0 - Expected 0 points.

Definition at line 160 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [9/11]

TEST_F ( RANSACTest  ,
TestSmallEpsilon   
)

Test Scenario: Really small threshold.

Only the points of the plane are considered as part of the ground.

Definition at line 97 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [10/11]

TEST_F ( RANSACTest  ,
TestThresholdZero   
)

Test Scenario: The epsilon threshold is set to 0 - No points are removed.

Definition at line 72 of file ransac_test.cpp.

Here is the call graph for this function:

◆ TEST_F() [11/11]

TEST_F ( RANSACTest  ,
TestZeroRepetitions   
)

Test Scenario: Number of repetitions is set to 0 - Expected a point cloud with 0 points.

Definition at line 84 of file ransac_test.cpp.

Here is the call graph for this function: