22#ifndef _PLUGINS_PERCEPTION_TABLETOP_OBJECTS_VISUALIZATION_THREAD_H_
23#define _PLUGINS_PERCEPTION_TABLETOP_OBJECTS_VISUALIZATION_THREAD_H_
25#ifndef HAVE_VISUAL_DEBUGGING
26# error TabletopVisualizationThread was disabled by build flags
29#include "visualization_thread_base.h"
31#include <aspect/configurable.h>
33#include <core/threading/mutex.h>
34#include <core/threading/thread.h>
35#include <plugins/ros/aspect/ros.h>
54 virtual void visualize(
const std::string & frame_id,
55 Eigen::Vector4f & table_centroid,
56 Eigen::Vector4f & normal,
62 std::map<unsigned int, double> & obj_confidence,
63 std::map<unsigned int, signed int> &best_obj_guess)
noexcept;
66 void triangulate_hull();
70 std::string frame_id_;
71 Eigen::Vector4f table_centroid_;
72 Eigen::Vector4f normal_;
79 std::map<unsigned int, double> obj_confidence_;
80 std::map<unsigned int, signed int> best_obj_guess_;
81 ros::Publisher * vispub_;
83 ros::Publisher *posepub_;
87 bool cfg_show_frustrum_;
88 float cfg_horizontal_va_;
89 float cfg_vertical_va_;
90 bool cfg_show_cvxhull_vertices_;
91 bool cfg_show_cvxhull_line_highlighting_;
92 bool cfg_show_cvxhull_vertex_ids_;
93 unsigned int cfg_duration_;
94 bool cfg_cylinder_fitting_;
95 std::string cfg_base_frame_;
98 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
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.
Send Marker messages to rviz.
virtual void init()
Initialize the thread.
virtual void loop()
Code to execute in the thread.
virtual void finalize()
Finalize the thread.
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 ¢roids, M_Vector4f &cylinder_params, std::map< unsigned int, double > &obj_confidence, std::map< unsigned int, signed int > &best_obj_guess) noexcept
Visualize the given data.
TabletopVisualizationThread()
Constructor.
Thread aspect to access configuration data.
Mutex mutual exclusion lock.
Thread aspect to get access to a ROS node handle.
Thread class encapsulation of pthreads.