Mht implementation main header.
More...
#include <ros/ros.h>
#include <visualization_msgs/MarkerArray.h>
#include <mtt/graph_wrapper.h>
#include <mtt/mht_declaration.h>
#include <mtt/k_best.h>
#include <mtt/cluster.h>
#include <laser_geometry/laser_geometry.h>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <pcl/surface/mls.h>
#include <pcl_conversions/pcl_conversions.h>
#include <Eigen/Dense>
#include <Eigen/Cholesky>
#include <iostream>
#include <istream>
#include <fstream>
#include <string>
#include <complex>
#include <boost/thread/thread.hpp>
Go to the source code of this file.
|
vector
< visualization_msgs::Marker > | createClustersMarkers (vector< MeasurementPtr > &clusters) |
| Create markers from clusters. More...
|
|
void | createObjects (vector< PointPtr > &data, vector< MeasurementPtr > &clusters, double clustering_distance) |
| Clustering function. More...
|
|
vector
< visualization_msgs::Marker > | createTargetMarkers (vector< TargetPtr > &targets) |
| Create markers from targets. More...
|
|
void | dataHandler (const sensor_msgs::PointCloud2 &msg) |
| Handler for the incoming data. More...
|
|
double | euclideanDistance (Point &p1, Point &p2) |
| Calculate Euclidean distance between Point class types. More...
|
|
void * | graphicalThread (void *data) |
| Graphical thread. More...
|
|
void | gvconfig_plugin_install_from_library (GVC_t *, char *, gvplugin_library_t *) |
| External function used to install a gv plugin from a library. More...
|
|
std_msgs::ColorRGBA | makeColor (int id) |
| Create a std_msgs color from a hsv color map. More...
|
|
std_msgs::ColorRGBA | makeColor (double r, double g, double b, double a) |
| Create a std_msgs color from rgba values. More...
|
|
geometry_msgs::Point | makePose (double x, double y, double z) |
| Create a geometry_msgs::Point from values. More...
|
|
void | pointCloud2ToVector (const sensor_msgs::PointCloud2 &cloud, vector< PointPtr > &data) |
| Convert the point cloud data into a laser scan type structure. More...
|
|
|
gvplugin_library_t | gvplugin_xgtk_LTX_library |
| Xgtk external graphviz library/plugin (only plugin, there's no need to create a library since it can be linked internally). More...
|
|
Mht implementation main header.
Definition in file mht.h.
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
-
- Returns
- markers to be published
Definition at line 729 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 175 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
-
- Returns
- markers to be published
Definition at line 509 of file mht.cpp.
void dataHandler |
( |
const sensor_msgs::PointCloud2 & |
msg | ) |
|
Handler for the incoming data.
- Parameters
-
Definition at line 213 of file mht.cpp.
double euclideanDistance |
( |
Point & |
p1, |
|
|
Point & |
p2 |
|
) |
| |
Calculate Euclidean distance between Point class types.
Only the x and y coordinates are used.
- Parameters
-
p1 | first point |
p2 | second point |
- Returns
- euclidean distance between the two points
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 810 of file mht.cpp.
void gvconfig_plugin_install_from_library |
( |
GVC_t * |
, |
|
|
char * |
, |
|
|
gvplugin_library_t * |
|
|
) |
| |
External function used to install a gv plugin from a library.
std_msgs::ColorRGBA makeColor |
( |
int |
id | ) |
|
Create a std_msgs color from a hsv color map.
- Parameters
-
- Returns
- a std_msgs::ColorRGBA color
Definition at line 723 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 711 of file mht.cpp.
geometry_msgs::Point makePose |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Create a geometry_msgs::Point from values.
- Parameters
-
x | x component |
y | y component |
z | z component |
- Returns
- a geometry_msgs::Point
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 83 of file mht.cpp.
gvplugin_library_t gvplugin_xgtk_LTX_library |
Xgtk external graphviz library/plugin (only plugin, there's no need to create a library since it can be linked internally).
Xgtk external graphviz library/plugin (only plugin, there's no need to create a library since it can be linked internally).
Definition at line 256 of file gvplugin_xgtk.cpp.