GMMGnuplotVisualization.h
Go to the documentation of this file.
1 
18 #include <ros/ros.h>
19 
20 // Global includes
21 #include <string>
22 #include <set>
23 #include <utility>
24 
25 // Package includes
26 #include <boost/shared_ptr.hpp>
27 
28 #include <tf/transform_listener.h>
29 
30 #include <visualization_msgs/Marker.h>
31 #include <visualization_msgs/MarkerArray.h>
32 
33 // Local includes
35 
36 namespace Visualization {
37 
42 {
43 public:
44 
49 
54 
61  void plotOrientationHistogram(const std::string& filename, const std::vector<std::pair<double, double>> data, const std::string& rotaxis);
62 
63 private:
64  // similar to active_scene_recognition/recognizer_prediction_psm asrVisualizer
74  void initPlot(const std::string& pPlotTitle,
75  const std::string& pXLabel,
76  const std::string& pYLabel,
77  const std::pair<double, double>& pXRange,
78  const std::pair<double, double>& pYRange,
79  unsigned int samples);
80 
84  void addPointToBuffer(double x, double y);
85 
91  void sendPlot();
92 
93 
98  {
99  public:
105  PlotFileHandler(std::string filename);
106 
110  void reset();
111 
115  void add(std::string in);
116 
121  void send(std::vector<std::pair<double, double>> pointBuffer);
122 
127  bool gnuplotExists();
128 
132  void flush();
133 
134  private:
135  //Interface with which configurations or data is sent to gnuplot.
137  // Buffer for text to be written to file
138  std::string mFileBuffer;
139  // Name of the file to write the gnuplot script into
140  std::string mFilename;
141  };
142 
143  //Interface through which configurations or data is sent to gnuplot and file
145 
146  //buffer for visualization points
147  std::vector<std::pair<double, double> > mPointBuffer;
148 };
149 
150 }
filename
TFSIMD_FORCE_INLINE const tfScalar & y() const
void plotOrientationHistogram(const std::string &filename, const std::vector< std::pair< double, double >> data, const std::string &rotaxis)
void initPlot(const std::string &pPlotTitle, const std::string &pXLabel, const std::string &pYLabel, const std::pair< double, double > &pXRange, const std::pair< double, double > &pYRange, unsigned int samples)
TFSIMD_FORCE_INLINE const tfScalar & x() const
std::vector< std::pair< double, double > > mPointBuffer
void send(std::vector< std::pair< double, double >> pointBuffer)


asr_psm_visualizations
Author(s): Gehrung Joachim, Meißner Pascal
autogenerated on Sat Nov 9 2019 03:49:12