rapid
A ROS robotics library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
box3d_roi_server.h
Go to the documentation of this file.
1 #ifndef _RAPID_PERCEPTION_BOX3D_ROI_SERVER_H_
2 #define _RAPID_PERCEPTION_BOX3D_ROI_SERVER_H_
3 
4 #include <string>
5 
6 #include "geometry_msgs/Point.h"
7 #include "interactive_markers/interactive_marker_server.h"
8 #include "rapid_msgs/Roi3D.h"
9 #include "visualization_msgs/InteractiveMarker.h"
10 #include "visualization_msgs/InteractiveMarkerFeedback.h"
11 
12 namespace rapid {
13 namespace perception {
14 // An interactive marker server for labeling a 3D box region of interest.
16  public:
17  Box3DRoiServer(const std::string& topic);
19  void Start();
20  void Start(double x, double y, double z, double scale_x, double scale_y,
21  double scale_z);
22  void Stop();
23  rapid_msgs::Roi3D roi();
24  void set_base_frame(const std::string& base_frame);
25 
26  private:
27  void Feedback(
28  const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
29  visualization_msgs::InteractiveMarker Box(double x, double y, double z,
30  double scale_x, double scale_y,
31  double scale_z);
32  visualization_msgs::InteractiveMarker Arrow(const std::string& dim,
33  const std::string& polarity,
34  double x, double y, double z,
35  double scale_x, double scale_y,
36  double scale_z);
37  void Update(const std::string& dim, const std::string& polarity,
38  const geometry_msgs::Point& point);
39  interactive_markers::InteractiveMarkerServer* server_;
40  rapid_msgs::Roi3D roi_;
41  std::string base_frame_;
42 };
43 } // namespace perception
44 } // namespace rapid
45 
46 #endif // _RAPID_PERCEPTION_BOX3D_ROI_SERVER_H_
Box3DRoiServer(const std::string &topic)
void set_base_frame(const std::string &base_frame)