Line fitting experimental code. More...
#include <ros/ros.h>#include <visualization_msgs/Marker.h>#include <visualization_msgs/MarkerArray.h>#include <mtt/TargetListPC.h>#include <tf/transform_listener.h>#include <laser_geometry/laser_geometry.h>#include <iostream>#include <pcl/point_types.h>#include <pcl/io/pcd_io.h>#include <pcl/kdtree/kdtree_flann.h>#include <pcl/surface/mls.h>#include <mtt/mtt_common.h>
Go to the source code of this file.
Functions | |
| void | calcClusterProps (vector< t_clustersPtr > &clusters, t_data &data) |
| void | calcObjectProps (vector< t_objectPtr > &objects) |
| void | cleanMarkers (void) |
| void | cleanObjets (vector< t_objectPtr > &objects) |
| bool | clustering (t_data &data, vector< t_clustersPtr > &clusters) |
| bool | clustersToObjects (vector< t_clustersPtr > &clusters, t_data &data, vector< t_objectPtr > &objectsPtr) |
| void | convertObjectsToTargetListPC (vector< t_objectPtr > &objects, mtt::TargetListPC &targets) |
| void | createMarkers (mtt::TargetListPC &targets) |
| void | free_lines (vector< t_objectPtr > &objects) |
| Removes lines from memory. | |
| int | main (int argc, char **argv) |
| void | maintenanceMarkers (vector< visualization_msgs::Marker > &markers) |
| void | markersFromData (t_data &data) |
| double | point2line_distance (double alpha, double ro, double x, double y) |
| Calculates the line to point distance. | |
| double | point2point_distance (double xi, double yi, double xf, double yf) |
| Calculates the distante between two points. | |
| void | pointCloud2ToData (const sensor_msgs::PointCloud2 &cloud, t_data &data) |
| void | pointsHandler (const sensor_msgs::PointCloud2 &points) |
| void | recursive_IEPF (t_objectPtr &object, t_data &data, int start, int end) |
| void | recursive_line_fitting (t_objectPtr &object, t_cluster &cluster, t_data &data) |
Variables | |
| double | angular_resolution = 3*M_PI/180. |
| double | clustering_threshold = 0.3 |
| string | frame_id |
| int | marker_id = 0 |
| map< pair< string, int >, pair < visualization_msgs::Marker, int > > | marker_map |
| ros::Publisher | markers_publisher |
| double | max_mean_variance = 0.03 |
| ros::Time | message_stamp |
| ros::Publisher | target_publisher |
Line fitting experimental code.
Definition in file line_fitting.cpp.
| void calcClusterProps | ( | vector< t_clustersPtr > & | clusters, | |
| t_data & | data | |||
| ) |
Definition at line 195 of file line_fitting.cpp.
| void calcObjectProps | ( | vector< t_objectPtr > & | objects | ) |
Definition at line 79 of file line_fitting.cpp.
| void cleanMarkers | ( | void | ) |
Definition at line 418 of file line_fitting.cpp.
| void cleanObjets | ( | vector< t_objectPtr > & | objects | ) |
Definition at line 74 of file line_fitting.cpp.
| bool clustering | ( | t_data & | data, | |
| vector< t_clustersPtr > & | clusters | |||
| ) |
Definition at line 219 of file line_fitting.cpp.
| bool clustersToObjects | ( | vector< t_clustersPtr > & | clusters, | |
| t_data & | data, | |||
| vector< t_objectPtr > & | objectsPtr | |||
| ) |
Definition at line 172 of file line_fitting.cpp.
| void convertObjectsToTargetListPC | ( | vector< t_objectPtr > & | objects, | |
| mtt::TargetListPC & | targets | |||
| ) |
Definition at line 346 of file line_fitting.cpp.
| void createMarkers | ( | mtt::TargetListPC & | targets | ) |
Definition at line 450 of file line_fitting.cpp.
| void free_lines | ( | vector< t_objectPtr > & | objects | ) |
Removes lines from memory.
| objects | list of objects |
Definition at line 68 of file line_fitting.cpp.
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 616 of file line_fitting.cpp.
| void maintenanceMarkers | ( | vector< visualization_msgs::Marker > & | markers | ) |
Definition at line 429 of file line_fitting.cpp.
| void markersFromData | ( | t_data & | data | ) |
Definition at line 528 of file line_fitting.cpp.
| double point2line_distance | ( | double | alpha, | |
| double | ro, | |||
| double | x, | |||
| double | y | |||
| ) |
Calculates the line to point distance.
| alpha | polar coordinates of the line | |
| ro | polar coordinates of the line | |
| x | cartesian coordinates of the point | |
| y |
Definition at line 65 of file line_fitting.cpp.
| double point2point_distance | ( | double | xi, | |
| double | yi, | |||
| double | xf, | |||
| double | yf | |||
| ) |
Calculates the distante between two points.
| xi | ||
| yi | ||
| xf | ||
| yf |
Definition at line 62 of file line_fitting.cpp.
| void pointCloud2ToData | ( | const sensor_msgs::PointCloud2 & | cloud, | |
| t_data & | data | |||
| ) |
Definition at line 283 of file line_fitting.cpp.
| void pointsHandler | ( | const sensor_msgs::PointCloud2 & | points | ) |
Definition at line 564 of file line_fitting.cpp.
| void recursive_IEPF | ( | t_objectPtr & | object, | |
| t_data & | data, | |||
| int | start, | |||
| int | end | |||
| ) |
This functions malloc a line to work with, each time it mallocs a line it increments the number of lines object data
Definition at line 119 of file line_fitting.cpp.
| void recursive_line_fitting | ( | t_objectPtr & | object, | |
| t_cluster & | cluster, | |||
| t_data & | data | |||
| ) |
Definition at line 164 of file line_fitting.cpp.
| double angular_resolution = 3*M_PI/180. |
Definition at line 60 of file line_fitting.cpp.
| double clustering_threshold = 0.3 |
Definition at line 59 of file line_fitting.cpp.
| string frame_id |
Definition at line 54 of file line_fitting.cpp.
| int marker_id = 0 |
Definition at line 57 of file line_fitting.cpp.
| map<pair<string,int>, pair<visualization_msgs::Marker,int> > marker_map |
Definition at line 56 of file line_fitting.cpp.
| ros::Publisher markers_publisher |
Definition at line 53 of file line_fitting.cpp.
| double max_mean_variance = 0.03 |
Definition at line 58 of file line_fitting.cpp.
| ros::Time message_stamp |
Definition at line 55 of file line_fitting.cpp.
| ros::Publisher target_publisher |
Definition at line 52 of file line_fitting.cpp.