00001 #ifndef _SURFACE_PERCEPTION_VISUALIZATION_H_ 00002 #define _SURFACE_PERCEPTION_VISUALIZATION_H_ 00003 00004 #include <vector> 00005 00006 #include "ros/ros.h" 00007 #include "visualization_msgs/Marker.h" 00008 00009 #include "surface_perception/object.h" 00010 #include "surface_perception/surface.h" 00011 #include "surface_perception/surface_objects.h" 00012 00013 namespace surface_perception { 00027 class SurfaceViz { 00028 public: 00030 explicit SurfaceViz(const ros::Publisher& marker_pub); 00031 00033 void set_surface_objects(const std::vector<SurfaceObjects>& surfaces); 00034 00036 void Show(); 00037 00039 void Hide(); 00040 00041 private: 00042 ros::Publisher marker_pub_; 00043 std::vector<SurfaceObjects> surfaces_; 00044 std::vector<visualization_msgs::Marker> markers_; 00045 }; 00046 00048 void SurfaceMarker(const Surface& surface, visualization_msgs::Marker* marker); 00049 00051 void ObjectMarkers(const std::vector<Object>& objects, 00052 std::vector<visualization_msgs::Marker>* markers); 00053 00057 void SurfaceMarkers(const std::vector<SurfaceObjects>& surfaces, 00058 std::vector<visualization_msgs::Marker>* markers); 00059 } // namespace surface_perception 00060 00061 #endif // _SURFACE_PERCEPTION_VISUALIZATION_H_