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

Ground removal using the RANSAC algorithm. More...

#include <ransac.hpp>

Inheritance diagram for RANSAC:
Inheritance graph
Collaboration diagram for RANSAC:
Collaboration graph

Public Member Functions

 RANSAC (const double epsilon, const int n_tries)
 Constructor for the RANSAC ground removal algorithm.
 
 RANSAC ()=default
 Default constructor.
 
void ground_removal (const sensor_msgs::msg::PointCloud2::SharedPtr &trimmed_point_cloud, sensor_msgs::msg::PointCloud2::SharedPtr &ground_removed_point_cloud, GroundGrid &ground_grid) const override
 Perform ground removal using the RANSAC algorithm.
 

Private Attributes

double epsilon
 Epsilon threshold for ground removal.
 
int n_tries
 Number of RANSAC iterations.
 

Detailed Description

Ground removal using the RANSAC algorithm.

This class implements the GroundRemoval interface and performs ground removal on a point cloud using the Random Sample Consensus (RANSAC) algorithm.

Definition at line 12 of file ransac.hpp.

Constructor & Destructor Documentation

◆ RANSAC() [1/2]

RANSAC::RANSAC ( const double  epsilon,
const int  n_tries 
)

Constructor for the RANSAC ground removal algorithm.

Parameters
epsilonEpsilon threshold for ground removal.
n_triesNumber of RANSAC iterations.

Definition at line 6 of file ransac.cpp.

◆ RANSAC() [2/2]

RANSAC::RANSAC ( )
default

Default constructor.

This constructor is provided as a default constructor.

Member Function Documentation

◆ ground_removal()

void RANSAC::ground_removal ( const sensor_msgs::msg::PointCloud2::SharedPtr &  trimmed_point_cloud,
sensor_msgs::msg::PointCloud2::SharedPtr &  ground_removed_point_cloud,
GroundGrid ground_grid 
) const
overridevirtual

Perform ground removal using the RANSAC algorithm.

This function implements the ground removal using the RANSAC algorithm on the provided point cloud.

Parameters
point_cloudThe input point cloud to be processed.
ground_removed_point_cloudThe resulting point cloud after ground removal.
ground_gridThe ground grid to be updated during ground removal.

Implements GroundRemoval.

Definition at line 8 of file ransac.cpp.

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

Member Data Documentation

◆ epsilon

double RANSAC::epsilon
private

Epsilon threshold for ground removal.

Definition at line 43 of file ransac.hpp.

◆ n_tries

int RANSAC::n_tries
private

Number of RANSAC iterations.

Definition at line 44 of file ransac.hpp.


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