marker_manager.hpp
Go to the documentation of this file.
1 #ifndef __MARKER_MANAGER__
2 #define __MARKER_MANAGER__
3 
6 #include <ros/ros.h>
7 #include <visualization_msgs/Marker.h>
8 #include <visualization_msgs/MarkerArray.h>
10 
12 {
14 {
17 };
21 class MarkerManager : public ManagerBase
22 {
23  public:
24  MarkerManager();
26 
36  bool addMarkerGroup(const std::string &group_key,
37  const std::string &topic_name);
38 
50  bool addMarker(const std::string &group_key, const std::string &marker_name,
51  const std::string &ns, const std::string &frame_id,
52  MarkerType type);
53 
61  bool setMarkerColor(const std::string &group_key,
62  const std::string &marker_name, double r, double g,
63  double b);
64 
72  bool setMarkerScale(const std::string &group_key,
73  const std::string &marker_name, double x, double y,
74  double z);
75 
86  bool setMarkerPoints(const std::string &group_key,
87  const std::string &marker_name,
88  const Eigen::Vector3d &initial_point,
89  const Eigen::Vector3d &final_point);
90 
100  bool setMarkerPose(const std::string &group_key,
101  const std::string &marker_name,
102  const Eigen::Affine3d &pose);
103 
107  void publishMarkers();
108 
109  private:
110  std::map<std::string, std::map<std::string, int> > marker_map_;
111  std::map<std::string, visualization_msgs::MarkerArray> marker_array_;
112  std::map<std::string, std::shared_ptr<realtime_tools::RealtimePublisher<
113  visualization_msgs::MarkerArray> > >
116 
123  bool getMarkerId(const std::string &group_key, const std::string &marker_name,
124  int &id) const;
125 };
126 } // namespace generic_control_toolbox
127 #endif
bool setMarkerPoints(const std::string &group_key, const std::string &marker_name, const Eigen::Vector3d &initial_point, const Eigen::Vector3d &final_point)
std::map< std::string, std::map< std::string, int > > marker_map_
std::map< std::string, visualization_msgs::MarkerArray > marker_array_
bool addMarkerGroup(const std::string &group_key, const std::string &topic_name)
bool setMarkerPose(const std::string &group_key, const std::string &marker_name, const Eigen::Affine3d &pose)
TFSIMD_FORCE_INLINE const tfScalar & y() const
bool setMarkerColor(const std::string &group_key, const std::string &marker_name, double r, double g, double b)
bool addMarker(const std::string &group_key, const std::string &marker_name, const std::string &ns, const std::string &frame_id, MarkerType type)
TFSIMD_FORCE_INLINE const tfScalar & x() const
TFSIMD_FORCE_INLINE const tfScalar & z() const
std::map< std::string, std::shared_ptr< realtime_tools::RealtimePublisher< visualization_msgs::MarkerArray > > > marker_pub_
bool getMarkerId(const std::string &group_key, const std::string &marker_name, int &id) const
bool setMarkerScale(const std::string &group_key, const std::string &marker_name, double x, double y, double z)


generic_control_toolbox
Author(s): diogo
autogenerated on Thu Jun 6 2019 19:54:44