aruco_marker_recognition.h
Go to the documentation of this file.
1 
19 #ifndef ARUCO_MARKER_RECOGNITION_H
20 #define ARUCO_MARKER_RECOGNITION_H
21 
22 #include <ros/ros.h>
23 #include <sensor_msgs/Image.h>
27 #include <opencv2/highgui/highgui.hpp>
28 #include <ivt_bridge/ivt_calibration.h>
29 #include <visualization_msgs/MarkerArray.h>
30 #include <asr_aruco_marker_recognition/GetRecognizer.h>
31 #include <asr_aruco_marker_recognition/ReleaseRecognizer.h>
32 #include <asr_object_database/ObjectMetaData.h>
33 #include <asr_msgs/AsrObject.h>
34 #include <dynamic_reconfigure/server.h>
35 #include <asr_aruco_marker_recognition/ArucoMarkerRecognitionConfig.h>
36 
37 #include "marker_detection.h"
38 
40 
41 using namespace asr_aruco_marker_recognition;
42 
44 const static std::string NODE_NAME("asr_aruco_marker_recognition");
45 
47 const static double DEFAULT_MARKER_SIZE(0.05);
48 
50 const static std::string GET_RECOGNIZER_SERVICE_NAME("get_recognizer");
51 const static std::string RELEASE_RECOGNIZER_SERVICE_NAME("release_recognizer");
52 
54 const static std::string OBJECT_DB_SERVICE_META_DATA("/asr_object_database/object_meta_data");
55 
58 
63 
64 
65 private:
66 
68 
70  std::string image_left_topic_;
71 
73  std::string image_right_topic_;
74 
77 
80 
83 
85  double marker_size_;
86 
92 
96 
98  dynamic_reconfigure::Server<ArucoMarkerRecognitionConfig> reconfigure_server_;
99 
101  ArucoMarkerRecognitionConfig config_;
102 
105 
108 
111 
117 
119  std::string recognizer_name_;
120 
123 
124 
131  bool processGetRecognizerRequest(GetRecognizer::Request &req, GetRecognizer::Response &res);
132 
139  bool processReleaseRecognizerRequest(ReleaseRecognizer::Request &req, ReleaseRecognizer::Response &res);
140 
148  void imageCallback(const sensor_msgs::ImageConstPtr& input_img_left, const sensor_msgs::ImageConstPtr& input_img_right, const sensor_msgs::CameraInfoConstPtr& cam_info_left, const sensor_msgs::CameraInfoConstPtr& cam_info_right);
149 
156  void configCallback(ArucoMarkerRecognitionConfig &config_, uint32_t level);
157 
164  cv::Mat drawMarkers(const cv::Mat &image, const std::vector<aruco::Marker> &markers);
165 
166  std::map<int, geometry_msgs::Pose> getMarkerPoses(const std::vector<aruco::Marker> &left_markers);
167 
175  std::map<int, geometry_msgs::Pose> getMarkerPoses(const std::vector<aruco::Marker> &left_markers, const std::vector<aruco::Marker> &right_markers, const ivt_bridge::IvtStereoCalibration &ivtCalib);
176 
177 
185  visualization_msgs::Marker createSquareMarker(int id, const geometry_msgs::Pose &pose, const string &frame_id);
186 
195  visualization_msgs::Marker createArrowMarker(int id, const geometry_msgs::Pose &pose, const string &frame_id, bool isNsX = false);
196 
205  visualization_msgs::Marker createMeshMarker(int id, const geometry_msgs::Pose &pose, const std::string &mesh_res, const string &frame_id);
206 
215  asr_msgs::AsrObject createAsrObject(const geometry_msgs::Pose &pose, const std::string &object_type, const string &frame_id, const std::string &mesh_res = "");
216 
217 
218 
219 public:
220 
221 
226 };
227 
228 }
229 
230 
231 #endif
232 
message_filters::Subscriber< sensor_msgs::Image > image_left_sub_
This is the base class of the marker recognition system used for creating the ros environment and con...
message_filters::Subscriber< sensor_msgs::CameraInfo > image_left_param_sub_
This class is used to detect markers in an image using the aruco-library.
message_filters::Subscriber< sensor_msgs::CameraInfo > image_right_param_sub_
static const std::string NODE_NAME("asr_aruco_marker_recognition")
message_filters::Subscriber< sensor_msgs::Image > image_right_sub_
static const std::string GET_RECOGNIZER_SERVICE_NAME("get_recognizer")
static const std::string OBJECT_DB_SERVICE_META_DATA("/asr_object_database/object_meta_data")
dynamic_reconfigure::Server< ArucoMarkerRecognitionConfig > reconfigure_server_
static const std::string RELEASE_RECOGNIZER_SERVICE_NAME("release_recognizer")
message_filters::Synchronizer< ApproximatePolicy > ApproximateSync
message_filters::sync_policies::ApproximateTime< sensor_msgs::Image, sensor_msgs::Image, sensor_msgs::CameraInfo, sensor_msgs::CameraInfo > ApproximatePolicy
static const double DEFAULT_MARKER_SIZE(0.05)


asr_aruco_marker_recognition
Author(s): Allgeyer Tobias, Meißner Pascal, Qattan Mohamad
autogenerated on Mon Jun 10 2019 12:40:21