Class for GeometryMap. More...
#include <geometry_map.h>
Public Types | |
typedef std::vector < cob_3d_mapping::Polygon::Ptr > ::iterator | cylinder_iterator |
Cylinder iterator. | |
typedef std::vector < cob_3d_mapping::Polygon::Ptr > ::iterator | polygon_iterator |
Polygon iterator. | |
Public Member Functions | |
void | addMapEntry (cob_3d_mapping::Polygon::Ptr &p_ptr) |
Add polygon to map. | |
void | addMapEntry (cob_3d_mapping::Cylinder::Ptr &c_ptr) |
Add cylinder to map. | |
void | cleanUp () |
Remove clutter from map. | |
void | clearMap () |
Remove all shapes from map. | |
void | colorizeMap () |
Colorize shapes in map. | |
GeometryMap () | |
Constructor for geometry map object. | |
const Eigen::Affine3f & | getLastError () |
Last transformation error is returned. | |
std::vector < cob_3d_mapping::Polygon::Ptr > * | getMapCylinder () |
Return Cylinder map. | |
std::vector < cob_3d_mapping::Polygon::Ptr > * | getMapPolygon () |
Return Polygon map. | |
void | incrFrame () |
Add shape cluster to map. | |
float | rounding (float x) |
Customized rounding operation. | |
void | saveMap (std::string path) |
Debug output of whole polygon map. | |
void | saveMapEntry (std::string path, int ctr, cob_3d_mapping::Polygon &p) |
Debug output of polygon map to file. | |
void | setFilePath (std::string file_path) |
Return ShapeCluster map. | |
void | setMergeThresholds (double cos_angle, double d) |
Set merging thresholds. | |
void | setSaveToFile (bool save_to_file) |
Set option if map is saved to file. | |
~GeometryMap () | |
Destructor for geometry map object. | |
Protected Attributes | |
double | cos_angle_ |
double | d_ |
std::string | file_path_ |
int | frame_counter_ |
Eigen::Affine3f | last_tf_err_ |
std::vector < cob_3d_mapping::Polygon::Ptr > | map_cylinder_ |
std::vector < cob_3d_mapping::Polygon::Ptr > | map_polygon_ |
unsigned int | new_id_ |
bool | save_to_file_ |
Class for GeometryMap.
The class GeometryMap handles storage of Shape objects of types Polygon,Cylinder,ShapeCluster.
Definition at line 85 of file geometry_map.h.
typedef std::vector<cob_3d_mapping::Polygon::Ptr>::iterator GeometryMap::cylinder_iterator |
Cylinder iterator.
Definition at line 96 of file geometry_map.h.
typedef std::vector<cob_3d_mapping::Polygon::Ptr>::iterator GeometryMap::polygon_iterator |
Polygon iterator.
Definition at line 91 of file geometry_map.h.
GeometryMap::GeometryMap | ( | ) | [inline] |
Constructor for geometry map object.
Definition at line 101 of file geometry_map.h.
GeometryMap::~GeometryMap | ( | ) | [inline] |
Destructor for geometry map object.
Definition at line 110 of file geometry_map.h.
void GeometryMap::addMapEntry | ( | cob_3d_mapping::Polygon::Ptr & | p_ptr | ) |
Add polygon to map.
Method adds new polygon to map or initiates merge process with existing polygons in map. Weighting and merging configuration are set.
[in] | p_ptr | Polygon, that is added to map. |
Definition at line 92 of file geometry_map.cpp.
void GeometryMap::addMapEntry | ( | cob_3d_mapping::Cylinder::Ptr & | c_ptr | ) |
Add cylinder to map.
Method adds new cylinder to map or initiates merge process with existing cylinders in map. Weighting and merging configuration are set.
[in] | c_ptr | Cylinder, that is added to map. |
Definition at line 146 of file geometry_map.cpp.
void GeometryMap::cleanUp | ( | ) |
Remove clutter from map.
Geometry map is cleaned using criterias like: Minimal size of shape, plausible parameters, repeated detection.
Definition at line 329 of file geometry_map.cpp.
void GeometryMap::clearMap | ( | ) |
Remove all shapes from map.
Definition at line 425 of file geometry_map.cpp.
void GeometryMap::colorizeMap | ( | ) |
Colorize shapes in map.
Definition at line 432 of file geometry_map.cpp.
const Eigen::Affine3f& GeometryMap::getLastError | ( | ) | [inline] |
Last transformation error is returned.
Definition at line 271 of file geometry_map.h.
std::vector<cob_3d_mapping::Polygon::Ptr>* GeometryMap::getMapCylinder | ( | ) | [inline] |
Return Cylinder map.
Definition at line 223 of file geometry_map.h.
std::vector<cob_3d_mapping::Polygon::Ptr>* GeometryMap::getMapPolygon | ( | ) | [inline] |
Return Polygon map.
Definition at line 213 of file geometry_map.h.
void GeometryMap::incrFrame | ( | ) | [inline] |
Add shape cluster to map.
Method adds new shape cluster to map or initiates merge process with existing shape clusters in map. Weighting and merging configuration are set.
[in] | sc_ptr | Shape Cluster, that is added to map. Transformation error is calculated. |
The error Transformation between two polygons from different input frames is calculated. param[in] list_polygon List of Polygons to be checked for similarity. param[in] tf_old Original transformation param[out] adjust_tf The correctional transformation, calculated by this function. Increment frame counter.
Definition at line 159 of file geometry_map.h.
float GeometryMap::rounding | ( | float | x | ) |
Customized rounding operation.
void GeometryMap::saveMap | ( | std::string | path | ) |
Debug output of whole polygon map.
[in] | path | Name of output file. |
Definition at line 410 of file geometry_map.cpp.
void GeometryMap::saveMapEntry | ( | std::string | path, |
int | ctr, | ||
cob_3d_mapping::Polygon & | p | ||
) |
Debug output of polygon map to file.
[in] | path | path Name of output file. |
[in] | p | Polygon that is saved. |
Definition at line 383 of file geometry_map.cpp.
void GeometryMap::setFilePath | ( | std::string | file_path | ) | [inline] |
Return ShapeCluster map.
[in] | file_path | Filepath |
Definition at line 239 of file geometry_map.h.
void GeometryMap::setMergeThresholds | ( | double | cos_angle, |
double | d | ||
) | [inline] |
Set merging thresholds.
[in] | cos_angle | Angular limit. |
[in] | d | Distance limit. |
Definition at line 260 of file geometry_map.h.
void GeometryMap::setSaveToFile | ( | bool | save_to_file | ) | [inline] |
Set option if map is saved to file.
[in] | save_to_file | Set to true, to enable file output. |
Definition at line 249 of file geometry_map.h.
double GeometryMap::cos_angle_ [protected] |
Angle limit, used during merging.
Definition at line 285 of file geometry_map.h.
double GeometryMap::d_ [protected] |
Distance threshold, used during merging.
Definition at line 286 of file geometry_map.h.
std::string GeometryMap::file_path_ [protected] |
Path for file output.
Definition at line 283 of file geometry_map.h.
int GeometryMap::frame_counter_ [protected] |
Counter for frame_stamp of shapes.
Definition at line 282 of file geometry_map.h.
Eigen::Affine3f GeometryMap::last_tf_err_ [protected] |
Transformation error.
Definition at line 287 of file geometry_map.h.
std::vector<cob_3d_mapping::Polygon::Ptr> GeometryMap::map_cylinder_ [protected] |
Array containing all cylinder structures.
Definition at line 278 of file geometry_map.h.
std::vector<cob_3d_mapping::Polygon::Ptr> GeometryMap::map_polygon_ [protected] |
Array containing all polygon structures.
Definition at line 277 of file geometry_map.h.
unsigned int GeometryMap::new_id_ [protected] |
Counter for shape IDs
Definition at line 280 of file geometry_map.h.
bool GeometryMap::save_to_file_ [protected] |
Boolean for file output.
Definition at line 284 of file geometry_map.h.