Fawkes API  Fawkes Development Version
visualization_thread_base.h
1 
2 /***************************************************************************
3  * visualization_thread_base.h - Visualization base class
4  *
5  * Created: Fri Nov 11 00:11:23 2011
6  * Copyright 2011 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef _PLUGINS_PERCEPTION_TABLETOP_OBJECTS_VISUALIZATION_BASE_H_
23 #define _PLUGINS_PERCEPTION_TABLETOP_OBJECTS_VISUALIZATION_BASE_H_
24 
25 #ifndef HAVE_VISUAL_DEBUGGING
26 # error TabletopVisualizationThread was disabled by build flags
27 #endif
28 
29 #include <utils/time/time.h>
30 
31 #include <Eigen/Core>
32 #include <Eigen/StdVector>
33 #include <map>
34 
36 {
37 public:
38  /** Aligned vector of vectors/points. */
39  typedef std::vector<Eigen::Vector4f, Eigen::aligned_allocator<Eigen::Vector4f>> V_Vector4f;
40  /** aligned map of vectors. */
41  typedef std::map<unsigned int,
42  Eigen::Vector4f,
43  std::less<unsigned int>,
44  Eigen::aligned_allocator<std::pair<const unsigned int, Eigen::Vector4f>>>
46  // Eigen::aligned_allocator<Eigen::Vector4f>
47 
49 
50  virtual void visualize(const std::string & frame_id,
51  Eigen::Vector4f & table_centroid,
52  Eigen::Vector4f & normal,
53  V_Vector4f & table_hull_vertices,
54  V_Vector4f & table_model_vertices,
55  V_Vector4f & good_table_hull_edges,
56  M_Vector4f & centroids,
57  M_Vector4f & cylinder_params,
58  std::map<unsigned int, double> & obj_confidence,
59  std::map<unsigned int, signed int> &best_obj_guess) noexcept = 0;
60 };
61 
62 #endif
Base class for virtualization thread.
std::vector< Eigen::Vector4f, Eigen::aligned_allocator< Eigen::Vector4f > > V_Vector4f
Aligned vector of vectors/points.
std::map< unsigned int, Eigen::Vector4f, std::less< unsigned int >, Eigen::aligned_allocator< std::pair< const unsigned int, Eigen::Vector4f > > > M_Vector4f
aligned map of vectors.
virtual ~TabletopVisualizationThreadBase()
Virtual empty destructor.
virtual void visualize(const std::string &frame_id, Eigen::Vector4f &table_centroid, Eigen::Vector4f &normal, V_Vector4f &table_hull_vertices, V_Vector4f &table_model_vertices, V_Vector4f &good_table_hull_edges, M_Vector4f &centroids, M_Vector4f &cylinder_params, std::map< unsigned int, double > &obj_confidence, std::map< unsigned int, signed int > &best_obj_guess) noexcept=0
Visualize the given data.