/home/laradmin/lar/perception/planarobstacles/mtt/src/mht.cpp File Reference

MHT main implementation. More...

#include <mtt/mht.h>
Include dependency graph for mht.cpp:

Go to the source code of this file.

Functions

vector
< visualization_msgs::Marker > 
createClustersMarkers (vector< MeasurementPtr > &clusters)
 Create markers from clusters.
void createObjects (vector< PointPtr > &data, vector< MeasurementPtr > &measurements, double clustering_distance)
 Clustering function.
vector
< visualization_msgs::Marker > 
createTargetMarkers (vector< TargetPtr > &targets)
 Create markers from targets.
void dataHandler (const sensor_msgs::PointCloud2 &msg)
 Handler for the incoming data.
void dataHandlerFromFile_clusters (vector< MeasurementPtr > &clusters)
void dataHandlerFromFile_points (vector< PointPtr > &raw_points)
double euclideanDistance (PointPtr &p1, PointPtr &p2)
void * graphicalThread (void *data)
 Graphical thread.
int main (int argc, char **argv)
std_msgs::ColorRGBA makeColor (int id)
 Create a std_msgs color from a hsv color map.
std_msgs::ColorRGBA makeColor (double r, double g, double b, double a)
 Create a std_msgs color from rgba values.
visualization_msgs::Marker makeEllipse (Vector2d mean, Matrix2d covariance, double threshold, string ns, std_msgs::ColorRGBA color, int id, geometry_msgs::Point position)
geometry_msgs::Point makePoint (double x, double y, double z)
template<class T >
visualization_msgs::Marker makeTrail (vector< T > &past_states, string ns, std_msgs::ColorRGBA color, int id, geometry_msgs::Point position)
void pointCloud2ToUnorganizedVector (const sensor_msgs::PointCloud2 &cloud, vector< PointPtr > &data)
void pointCloud2ToVector (const sensor_msgs::PointCloud2 &cloud, vector< PointPtr > &data)
 Convert the point cloud data into a laser scan type structure.
void recursiveAssociation (vector< PointPtr > &data, vector< pair< MeasurementPtr, bool > > &point_association, double clustering_distance, uint p)

Variables

string fileName
GVGraphgraph_context
 Graph context pointer, used in the xgtk plug-in.
hypothesisTreePtr htreePtr
 External variable linking to the Mht context class (main workhorse of the mht algorithm).
Publisher markers_publisher
Mht mht
 Mht context class (main workhorse of the mht algorithm).
string tracking_frame
 Tracking frame, frame id of the current tracking frame.

Detailed Description

MHT main implementation.

Definition in file mht.cpp.


Function Documentation

vector<visualization_msgs::Marker> createClustersMarkers ( vector< MeasurementPtr > &  clusters  ) 

Create markers from clusters.

This function creates a set of markers for the current point clusters, this uses the Markers class to keep a up to date list of the current markers.

Parameters:
clusters vector of Measurement 's classes
Returns:
markers to be published

Definition at line 727 of file mht.cpp.

void createObjects ( vector< PointPtr > &  data,
vector< MeasurementPtr > &  clusters,
double  clustering_distance 
)

Clustering function.

This functions separates the incoming data vector into a set of clusters based on a clustering_distance.

Parameters:
data input point vector (it is in fact a std::vector<Mht::PointPtr> reference since its safer to work with shared_ptr's.
clusters output vector of clusters, these clusters are treated has measurements and use the Measurement class.
clustering_distance distance value used to break clusters.

Definition at line 173 of file mht.cpp.

vector<visualization_msgs::Marker> createTargetMarkers ( vector< TargetPtr > &  targets  ) 

Create markers from targets.

This function creates a set of markers for the current targets, this uses the Markers class to keep a up to date list of the current markers.

Parameters:
targets vector of Target 's
Returns:
markers to be published

Definition at line 507 of file mht.cpp.

void dataHandler ( const sensor_msgs::PointCloud2 &  msg  ) 

Handler for the incoming data.

Parameters:
msg incoming point cloud

Definition at line 211 of file mht.cpp.

void dataHandlerFromFile_clusters ( vector< MeasurementPtr > &  clusters  ) 

Definition at line 307 of file mht.cpp.

void dataHandlerFromFile_points ( vector< PointPtr > &  raw_points  ) 

Definition at line 259 of file mht.cpp.

double euclideanDistance ( PointPtr p1,
PointPtr p2 
)

Definition at line 56 of file mht.cpp.

void* graphicalThread ( void *  data  ) 

Graphical thread.

This function is the main workhorse for the graphical interface. The graphical interface works in a separate thread that runs this function.

Parameters:
data generic pointer, is not used
Returns:
data generic pointer, is not used

Definition at line 808 of file mht.cpp.

int main ( int  argc,
char **  argv 
)

Additional thread to run the graphviz plug-in

Definition at line 822 of file mht.cpp.

std_msgs::ColorRGBA makeColor ( int  id  ) 

Create a std_msgs color from a hsv color map.

Parameters:
id color code
Returns:
a std_msgs::ColorRGBA color

Definition at line 721 of file mht.cpp.

std_msgs::ColorRGBA makeColor ( double  r,
double  g,
double  b,
double  a 
)

Create a std_msgs color from rgba values.

Parameters:
r red value
g green value
b blue value
a alpha value
Returns:
a std_msgs::ColorRGBA color

Definition at line 709 of file mht.cpp.

visualization_msgs::Marker makeEllipse ( Vector2d  mean,
Matrix2d  covariance,
double  threshold,
string  ns,
std_msgs::ColorRGBA  color,
int  id,
geometry_msgs::Point  position 
)

Definition at line 409 of file mht.cpp.

geometry_msgs::Point makePoint ( double  x,
double  y,
double  z 
)

Definition at line 400 of file mht.cpp.

template<class T >
visualization_msgs::Marker makeTrail ( vector< T > &  past_states,
string  ns,
std_msgs::ColorRGBA  color,
int  id,
geometry_msgs::Point  position 
) [inline]

Definition at line 464 of file mht.cpp.

void pointCloud2ToUnorganizedVector ( const sensor_msgs::PointCloud2 &  cloud,
vector< PointPtr > &  data 
)

Definition at line 61 of file mht.cpp.

void pointCloud2ToVector ( const sensor_msgs::PointCloud2 &  cloud,
vector< PointPtr > &  data 
)

Convert the point cloud data into a laser scan type structure.

Convert from ros format to a local format.

Parameters:
cloud ros format used in point clouds, input message.
data outgoing vector of Point class points.

Definition at line 81 of file mht.cpp.

void recursiveAssociation ( vector< PointPtr > &  data,
vector< pair< MeasurementPtr, bool > > &  point_association,
double  clustering_distance,
uint  p 
)

Definition at line 142 of file mht.cpp.


Variable Documentation

string fileName

Definition at line 54 of file mht.cpp.

Graph context pointer, used in the xgtk plug-in.

External variable linking to the main graph context created in the mht main source code pmht.cpp.

Definition at line 43 of file mht.cpp.

External variable linking to the Mht context class (main workhorse of the mht algorithm).

Definition at line 50 of file mht.cpp.

Publisher markers_publisher

Definition at line 52 of file mht.cpp.

Mht context class (main workhorse of the mht algorithm).

Definition at line 49 of file mht.cpp.

Tracking frame, frame id of the current tracking frame.

Definition at line 46 of file mht.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mtt
Author(s): Jorge Almeida
autogenerated on Wed Jul 23 04:34:58 2014