Functions | Variables
main.cpp File Reference

Main node source code, handlers and loop. More...

#include "lidar_segmentation.h"
#include "clustering.h"
#include "groundtruth.h"
#include "visualization_rviz.h"
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

bool correctClusterId (PointPtr p, int cluster_id)
 Compares the point id to a cluster_id, if true that point is erased. More...
 
int createPointsFromFile (vector< PointPtr > &points, C_DataFromFilePtr data_gt)
 Creates a Point class from the file with the Ground-truth points. More...
 
void dataFromFileHandler (vector< PointPtr > &groundtruth_points, int iteration)
 Handler for the incoming data. More...
 
void filterPoints (vector< PointPtr > &points_in, vector< PointPtr > &points_out, double min_range, double max_range)
 Function that outputs a set of points with range between min_range and max_range values. More...
 
int main (int argc, char **argv)
 
void removeInvalidPoints (vector< PointPtr > &laser_points, vector< ClusterPtr > clusters, uint min_points)
 Removes points belonging to clusters with less than min_points. More...
 
int writeResults_GT (uint iteration, vector< PointPtr > &points, int id_result)
 Wirtes properties of the Ground-truth segments into a text file. More...
 
int writeResults_paths (vector< PointPtr > &points, int algorithm_id, double initial_value, double increment, int number_of_iterations, uint iteration, int id_result)
 Wirtes properties of the Algorithms segments into a text file. More...
 

Variables

ros::Publisher markers_pub
 
int scan_header
 

Detailed Description

Main node source code, handlers and loop.

Author
Daniel Coimbra

Definition in file main.cpp.

Function Documentation

bool correctClusterId ( PointPtr  p,
int  cluster_id 
)

Compares the point id to a cluster_id, if true that point is erased.

Parameters
ppoint to be compared
cluster_idid of the invalid cluster
Returns
1 if point id = cluster id

Definition at line 42 of file main.cpp.

int createPointsFromFile ( vector< PointPtr > &  points,
C_DataFromFilePtr  data_gt 
)

Creates a Point class from the file with the Ground-truth points.

Parameters
pointsincoming Laser Points
data_gtsoutput x, y and labels from one iteration, it uses the C_DataFromFile class
Returns
return 0

Definition at line 1272 of file main.cpp.

void dataFromFileHandler ( vector< PointPtr > &  groundtruth_points,
int  iteration 
)

Handler for the incoming data.

Parameters
pointsincoming Laser Points
iterationiteration of the Laser Scan
Returns
void

Definition at line 94 of file main.cpp.

void filterPoints ( vector< PointPtr > &  points_in,
vector< PointPtr > &  points_out,
double  min_range,
double  max_range 
)

Function that outputs a set of points with range between min_range and max_range values.

Parameters
points_inincoming Laser Points
points_outpoints with range between the minimum and maximum value
min_rangeminimum range for a point to be considered valid
max_rangemaximum range for a point to be considered valid
Returns
void

Definition at line 47 of file main.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 1300 of file main.cpp.

void removeInvalidPoints ( vector< PointPtr > &  laser_points,
vector< ClusterPtr clusters,
uint  min_points 
)

Removes points belonging to clusters with less than min_points.

Parameters
laser_pointsincoming Laser Points
clustersclusters input vector of clusters, these clusters use the Cluster class
min_pointsclusters with points less than this value are removed
Returns
void

Definition at line 72 of file main.cpp.

int writeResults_GT ( uint  iteration,
vector< PointPtr > &  points,
int  id_result 
)

Wirtes properties of the Ground-truth segments into a text file.

Parameters
iterationiteration of the Laser Scan
pointsincoming Laser Points
id_resultif id_result == 1 writes segments' boundaries; else writes segments' centers
Returns
return 0

Definition at line 222 of file main.cpp.

int writeResults_paths ( vector< PointPtr > &  points,
int  algorithm_id,
double  initial_value,
double  increment,
int  number_of_iterations,
uint  iteration,
int  id_result 
)

Wirtes properties of the Algorithms segments into a text file.

Parameters
pointsincoming Laser Points
algorithm_idcase 1 - Simple Segmentation; case 2 - Multivariable Segmentation; case 3 - Dietmayer Segmentation; case 4 - Adaptive Breakpoint Detector; case 5 - Spatital Nearest Neigbour; case 6 - Santos Approach C0 variation; case 7 - Santos Approach Beta variation;
initial_valueInitial value of the threshold parameter;
incrementIncrement of the threshold parameter;
number_of_iterationsNumber of threshold variations
iterationiteration of the Lasr Scan
id_resultif id_result == 1 writes segments' boundaries; else writes segments' centers
Returns
return 0

Definition at line 349 of file main.cpp.

Variable Documentation

ros::Publisher markers_pub

Definition at line 39 of file main.cpp.

int scan_header

Definition at line 40 of file main.cpp.



lidar_segmentation
Author(s): Daniel Coimbra
autogenerated on Mon Mar 2 2015 01:32:12