asrVisualizer.h
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include <ros/ros.h>
21 #include <boost/shared_ptr.hpp>
22 #include "gnuplot-iostream.h"
23 
24 #include <string>
25 #include <set>
26 #include <utility>
27 
28 #include <Eigen/Core>
29 #include "AttributedPoint.h"
30 #include <visualization_msgs/Marker.h>
31 #include <visualization_msgs/MarkerArray.h>
32 
33 namespace ASR
34 {
35 
37  {
38  public:
39  asrVisualizer(int max_number_of_published_vis_msgs = 100);
40 
50  void initAnimatedPlot(const std::string& pPlotTitle,
51  const std::string& pXLabel,
52  const std::string& pYLabel,
53  const std::pair<float, float>& pXRange,
54  const std::pair<float, float>& pYRange,
55  const std::pair<float, float>& pDelta);
56 
57 
58 
63  void sendPlotToGnuplot();
64 
68  void addPointToFoundBuffer(float x, float y) { addPointToFoundBuffer(Eigen::Vector2f(x,y)); }
69  void addPointToFoundBuffer(Eigen::Vector2f point);
70 
82  void publishRVizMarker(std::vector<AttributedPoint> hypotheses, std::vector<AttributedPoint> found_poses,
83  const std::string target_frame = "/map", const int id = 1);
84 
85 
89  void addPointToUnfoundBuffer(Eigen::Vector2f point);
90 
97  void addAttributedPoints(std::vector<AttributedPoint> hypotheses, std::vector<AttributedPoint> found_poses);
98 
99 
106  void generateMarkerArray(std::vector<AttributedPoint> hypotheses,
107  std::vector<AttributedPoint> found_poses);
108 
113  void publishMarkerArray();
114 
115 
116  private:
118  visualization_msgs::MarkerArray markerArray;
119 
121 
122  //Interface with which configurations or data is sent to gnuplot.
124 
125  // the publisher to publish marker msgs to rviz
127 
128  //buffers for visualization points
129  std::vector<std::pair<double, double> > mUnfoundBuffer;
130  std::vector<std::pair<double, double> > mFoundBuffer;
131  std::vector<std::pair<float, float> > mVisitedViews;
132 
133  };
134 
135 
137 
138 }
asrVisualizer(int max_number_of_published_vis_msgs=100)
std::vector< std::pair< double, double > > mUnfoundBuffer
void addPointToFoundBuffer(float x, float y)
Definition: asrVisualizer.h:68
ros::Publisher publisher
void addPointToUnfoundBuffer(Eigen::Vector2f point)
void generateMarkerArray(std::vector< AttributedPoint > hypotheses, std::vector< AttributedPoint > found_poses)
asrVisualizer::generateMarkerArray generates a MarkerArray for RViz visualization ...
ros::Publisher hypothesis3dPublisher
visualization_msgs::MarkerArray markerArray
boost::shared_ptr< asrVisualizer > asrVisualizerPtr
void addAttributedPoints(std::vector< AttributedPoint > hypotheses, std::vector< AttributedPoint > found_poses)
void publishRVizMarker(std::vector< AttributedPoint > hypotheses, std::vector< AttributedPoint > found_poses, const std::string target_frame="/map", const int id=1)
void initAnimatedPlot(const std::string &pPlotTitle, const std::string &pXLabel, const std::string &pYLabel, const std::pair< float, float > &pXRange, const std::pair< float, float > &pYRange, const std::pair< float, float > &pDelta)
std::vector< std::pair< float, float > > mVisitedViews
std::vector< std::pair< double, double > > mFoundBuffer
void publishMarkerArray()
asrVisualizer::publishMarkerArray publishs the MarkerArray
boost::shared_ptr< Gnuplot > mGnuplotHandler


asr_recognizer_prediction_psm
Author(s): Braun Kai, Meißner Pascal
autogenerated on Wed Feb 19 2020 03:31:28