plot.h
Go to the documentation of this file.
1 
11 #ifndef PLOT_H
12 #define PLOT_H
13 
14 #include <deque>
15 #include <map>
16 
17 #include <dynamic_reconfigure/server.h>
18 #include <gtest/gtest.h>
20 #include <ros/ros.h>
23 #include <tf2_ros/message_filter.h>
25 
26 #include <toposens_driver/sensor.h>
27 #include <toposens_markers/TsMarkersConfig.h>
28 #include <toposens_msgs/TsScan.h>
29 
31 {
32 static const std::string kMarkersTopic = "ts_markers";
34 static const std::string kMarkersNs = "TsMarkers";
36 static const std::string kMeshNs = "TsSensor";
37 
49 class Plot
50 {
52  static const auto _baseScale = rviz_visual_tools::scales::LARGE;
53 
54 public:
60  Plot(ros::NodeHandle nh, ros::NodeHandle private_nh);
61  ~Plot();
62 
65  void publishSensorMeshes();
66 
70 
71 private:
74  typedef dynamic_reconfigure::Server<TsMarkersConfig> Cfg;
75 
81  void _reconfig(TsMarkersConfig &cfg, uint32_t level);
82 
87  void _plot(const toposens_msgs::TsScan::ConstPtr &msg);
88 
95  void _staticTFCallback(const tf2_msgs::TFMessage::ConstPtr &tf);
96 
97  std::string _frame_id;
98  double _lifetime;
100  float _color_range;
104  std::shared_ptr<Cfg> _srv;
106  std::deque<toposens_msgs::TsScan> _scans;
109  std::string _target_frame;
117  std::string _sensor_mesh;
119  std::map<std::string, geometry_msgs::Pose> _pose_map;
120  std::map<std::string, std_msgs::ColorRGBA> _color_map;
121  std::map<std::string, rviz_visual_tools::colors> _mesh_color_map;
122 };
123 
124 } // namespace toposens_markers
125 
126 #endif
Plot(ros::NodeHandle nh, ros::NodeHandle private_nh)
Definition: plot.cpp:9
void _plot(const toposens_msgs::TsScan::ConstPtr &msg)
Definition: plot.cpp:91
void _reconfig(TsMarkersConfig &cfg, uint32_t level)
Definition: plot.cpp:60
std::string _sensor_mesh
Definition: plot.h:117
std::string _target_frame
Definition: plot.h:109
tf2_ros::MessageFilter< toposens_msgs::TsScan > * _tf2_filter
Definition: plot.h:114
void _staticTFCallback(const tf2_msgs::TFMessage::ConstPtr &tf)
Definition: plot.cpp:181
std::deque< toposens_msgs::TsScan > _scans
Definition: plot.h:106
std::map< std::string, rviz_visual_tools::colors > _mesh_color_map
Definition: plot.h:121
ros::Subscriber _scans_sub
Definition: plot.h:116
float _half_color_range
Definition: plot.h:102
void publishDefaultSensorMesh()
Definition: plot.cpp:243
std::shared_ptr< RvizVisualTools > RvizVisualToolsPtr
static const std::string kMarkersTopic
Definition: plot.h:32
tf2_ros::Buffer _tf2_buffer
Definition: plot.h:112
std::shared_ptr< Cfg > _srv
Definition: plot.h:104
std::map< std::string, std_msgs::ColorRGBA > _color_map
Definition: plot.h:120
dynamic_reconfigure::Server< TsMarkersConfig > Cfg
Definition: plot.h:74
static const auto _baseScale
Definition: plot.h:52
static const std::string kMarkersNs
Definition: plot.h:34
rviz_visual_tools::RvizVisualToolsPtr _rviz
Definition: plot.h:107
message_filters::Subscriber< toposens_msgs::TsScan > _tf2_scans_sub
Definition: plot.h:111
double _lifetime
Definition: plot.h:98
std::map< std::string, geometry_msgs::Pose > _pose_map
Definition: plot.h:119
void publishSensorMeshes()
Definition: plot.cpp:216
tf2_ros::TransformListener * _tf2_listener
Definition: plot.h:113
std::string _frame_id
Definition: plot.h:97
static const std::string kMeshNs
Definition: plot.h:36
ros::Subscriber _static_tf_sub
Definition: plot.h:118


toposens_markers
Author(s): Adi Singh, Sebastian Dengler, Christopher Lang, Roua Mokchah
autogenerated on Mon Feb 28 2022 23:57:46