This is the base class of the marker recognition system used for creating the ros environment and controlling the recognition processes. More...
#include <aruco_marker_recognition.h>
Public Member Functions | |
ArucoMarkerRecognition () | |
The constructor of this class. | |
Private Member Functions | |
void | configCallback (ArucoMarkerRecognitionConfig &config_, uint32_t level) |
The callback function which is called when the configuration file has changed. | |
visualization_msgs::Marker | createArrowMarker (int id, const geometry_msgs::Pose &pose, const string &frame_id, bool isNsX=false) |
Create a ros marker from a given pose of a found marker. | |
asr_msgs::AsrObject | createAsrObject (const geometry_msgs::Pose &pose, const std::string &object_type, const string &frame_id, const std::string &mesh_res="") |
Create a asr_object from a given marker pose. | |
visualization_msgs::Marker | createMeshMarker (int id, const geometry_msgs::Pose &pose, const std::string &mesh_res, const string &frame_id) |
Create a ros marker from a given pose of a found marker. | |
visualization_msgs::Marker | createSquareMarker (int id, const geometry_msgs::Pose &pose, const string &frame_id) |
Create a ros marker from a given pose of a found marker. | |
cv::Mat | drawMarkers (const cv::Mat &image, const std::vector< aruco::Marker > &markers) |
Draws recognized markers and their id into an image. | |
std::map< int, geometry_msgs::Pose > | getMarkerPoses (const std::vector< aruco::Marker > &left_markers) |
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) |
Calculates poses from corresponding found markers of the right and left image. | |
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) |
The ros callback which is called when new images are received. | |
bool | processGetRecognizerRequest (GetRecognizer::Request &req, GetRecognizer::Response &res) |
bool | processReleaseRecognizerRequest (ReleaseRecognizer::Request &req, ReleaseRecognizer::Response &res) |
Private Attributes | |
ros::Publisher | asr_objects_pub_ |
ArucoMarkerRecognitionConfig | config_ |
MarkerDetection | detector_ |
ros::ServiceServer | get_recognizer_service_ |
std::string | image_left_cam_info_topic_ |
message_filters::Subscriber < sensor_msgs::CameraInfo > | image_left_param_sub_ |
message_filters::Subscriber < sensor_msgs::Image > | image_left_sub_ |
std::string | image_left_topic_ |
std::string | image_right_cam_info_topic_ |
message_filters::Subscriber < sensor_msgs::CameraInfo > | image_right_param_sub_ |
message_filters::Subscriber < sensor_msgs::Image > | image_right_sub_ |
std::string | image_right_topic_ |
ros::Publisher | left_markers_img_pub_ |
double | marker_size_ |
ros::NodeHandle | nh_ |
ros::ServiceClient | object_mesh_service_client_ |
bool | recognition_paused_ |
std::string | recognizer_name_ |
dynamic_reconfigure::Server < ArucoMarkerRecognitionConfig > | reconfigure_server_ |
ros::ServiceServer | release_recognizer_service_ |
ros::Publisher | right_markers_img_pub_ |
boost::shared_ptr < ApproximateSync > | sync_policy_ |
bool | use_stereo_ |
ros::Publisher | vis_markers_pub_ |
This is the base class of the marker recognition system used for creating the ros environment and controlling the recognition processes.
Definition at line 62 of file aruco_marker_recognition.h.
The constructor of this class.
Definition at line 32 of file aruco_marker_recognition.cpp.
void aruco_marker_recognition::ArucoMarkerRecognition::configCallback | ( | ArucoMarkerRecognitionConfig & | config_, |
uint32_t | level | ||
) | [private] |
The callback function which is called when the configuration file has changed.
config | The updated configuration |
level | The level which is the result of ORing together all of level values of the parameters that have changed |
Definition at line 183 of file aruco_marker_recognition.cpp.
visualization_msgs::Marker aruco_marker_recognition::ArucoMarkerRecognition::createArrowMarker | ( | int | id, |
const geometry_msgs::Pose & | pose, | ||
const string & | frame_id, | ||
bool | isNsX = false |
||
) | [private] |
Create a ros marker from a given pose of a found marker.
id | The id of the found marker |
pose | The pose of the found marker |
frame_id | The id of the frame the marker pose is relative to |
isNsX | Determine if the ns is a "X" ns or not |
Definition at line 346 of file aruco_marker_recognition.cpp.
asr_msgs::AsrObject aruco_marker_recognition::ArucoMarkerRecognition::createAsrObject | ( | const geometry_msgs::Pose & | pose, |
const std::string & | object_type, | ||
const string & | frame_id, | ||
const std::string & | mesh_res = "" |
||
) | [private] |
Create a asr_object from a given marker pose.
pose | The pose of the marker |
object_type | The type of the object corresponding to the found marker provided by the object_database |
frame_id | The id of the frame the marker pose is relative to |
mesh_res | The markers' corresponding mesh resource provided by the object_database |
Definition at line 400 of file aruco_marker_recognition.cpp.
visualization_msgs::Marker aruco_marker_recognition::ArucoMarkerRecognition::createMeshMarker | ( | int | id, |
const geometry_msgs::Pose & | pose, | ||
const std::string & | mesh_res, | ||
const string & | frame_id | ||
) | [private] |
Create a ros marker from a given pose of a found marker.
id | The id of the found marker |
pose | The pose of the found marker |
mesh_res | The markers' corresponding mesh resource provided by the object_database |
frame_id | The id of the frame the marker pose is relative to |
Definition at line 377 of file aruco_marker_recognition.cpp.
visualization_msgs::Marker aruco_marker_recognition::ArucoMarkerRecognition::createSquareMarker | ( | int | id, |
const geometry_msgs::Pose & | pose, | ||
const string & | frame_id | ||
) | [private] |
Create a ros marker from a given pose of a found marker.
id | The id of the found marker |
pose | The pose of the found marker |
frame_id | The id of the frame the marker pose is relative to |
Definition at line 325 of file aruco_marker_recognition.cpp.
cv::Mat aruco_marker_recognition::ArucoMarkerRecognition::drawMarkers | ( | const cv::Mat & | image, |
const std::vector< aruco::Marker > & | markers | ||
) | [private] |
Draws recognized markers and their id into an image.
image | The image to draw the markers into |
markers | The markers to draw |
Definition at line 187 of file aruco_marker_recognition.cpp.
std::map< int, geometry_msgs::Pose > aruco_marker_recognition::ArucoMarkerRecognition::getMarkerPoses | ( | const std::vector< aruco::Marker > & | left_markers | ) | [private] |
Definition at line 195 of file aruco_marker_recognition.cpp.
std::map< int, geometry_msgs::Pose > aruco_marker_recognition::ArucoMarkerRecognition::getMarkerPoses | ( | const std::vector< aruco::Marker > & | left_markers, |
const std::vector< aruco::Marker > & | right_markers, | ||
const ivt_bridge::IvtStereoCalibration & | ivtCalib | ||
) | [private] |
Calculates poses from corresponding found markers of the right and left image.
left_markers | The markers found in the left image |
right_markers | The markers found in the right image |
ivtCalib | The calibration information of the used stereo camera system |
Definition at line 237 of file aruco_marker_recognition.cpp.
void aruco_marker_recognition::ArucoMarkerRecognition::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 | ||
) | [private] |
The ros callback which is called when new images are received.
input_img_left | The image of the left camera |
input_img_right | The image of the right camera |
cam_info_left | The camera parameters of the left camera |
cam_info_right | The camera parameters of the right camera |
Definition at line 107 of file aruco_marker_recognition.cpp.
bool aruco_marker_recognition::ArucoMarkerRecognition::processGetRecognizerRequest | ( | GetRecognizer::Request & | req, |
GetRecognizer::Response & | res | ||
) | [private] |
Processes the request to recognize markers
req | The request message |
res | The correlated response message |
Definition at line 93 of file aruco_marker_recognition.cpp.
bool aruco_marker_recognition::ArucoMarkerRecognition::processReleaseRecognizerRequest | ( | ReleaseRecognizer::Request & | req, |
ReleaseRecognizer::Response & | res | ||
) | [private] |
Processes the request to stop the marker recognition
req | The request message |
res | The correlated response message |
Definition at line 100 of file aruco_marker_recognition.cpp.
Definition at line 116 of file aruco_marker_recognition.h.
ArucoMarkerRecognitionConfig aruco_marker_recognition::ArucoMarkerRecognition::config_ [private] |
The configuration file containing the dynamic parameters of this system
Definition at line 101 of file aruco_marker_recognition.h.
The detector used to recognize the markers in an image
Definition at line 110 of file aruco_marker_recognition.h.
ros::ServiceServer aruco_marker_recognition::ArucoMarkerRecognition::get_recognizer_service_ [private] |
The servers of the provided services
Definition at line 94 of file aruco_marker_recognition.h.
std::string aruco_marker_recognition::ArucoMarkerRecognition::image_left_cam_info_topic_ [private] |
The topic of the left camera parameters
Definition at line 76 of file aruco_marker_recognition.h.
message_filters::Subscriber<sensor_msgs::CameraInfo> aruco_marker_recognition::ArucoMarkerRecognition::image_left_param_sub_ [private] |
Definition at line 90 of file aruco_marker_recognition.h.
message_filters::Subscriber<sensor_msgs::Image> aruco_marker_recognition::ArucoMarkerRecognition::image_left_sub_ [private] |
The ros subscribers
Definition at line 88 of file aruco_marker_recognition.h.
std::string aruco_marker_recognition::ArucoMarkerRecognition::image_left_topic_ [private] |
The topic of the left camera image
Definition at line 70 of file aruco_marker_recognition.h.
std::string aruco_marker_recognition::ArucoMarkerRecognition::image_right_cam_info_topic_ [private] |
The topic of the right camera parameters
Definition at line 79 of file aruco_marker_recognition.h.
message_filters::Subscriber<sensor_msgs::CameraInfo> aruco_marker_recognition::ArucoMarkerRecognition::image_right_param_sub_ [private] |
Definition at line 91 of file aruco_marker_recognition.h.
message_filters::Subscriber<sensor_msgs::Image> aruco_marker_recognition::ArucoMarkerRecognition::image_right_sub_ [private] |
Definition at line 89 of file aruco_marker_recognition.h.
std::string aruco_marker_recognition::ArucoMarkerRecognition::image_right_topic_ [private] |
The topic of the right camera image
Definition at line 73 of file aruco_marker_recognition.h.
The ros publishers
Definition at line 113 of file aruco_marker_recognition.h.
double aruco_marker_recognition::ArucoMarkerRecognition::marker_size_ [private] |
The size of the used markers in meters
Definition at line 85 of file aruco_marker_recognition.h.
Ros' interface for creating subscribers, publishers, etc.
Definition at line 82 of file aruco_marker_recognition.h.
ros::ServiceClient aruco_marker_recognition::ArucoMarkerRecognition::object_mesh_service_client_ [private] |
The client used to contact the object database service
Definition at line 104 of file aruco_marker_recognition.h.
A bool value indicating whether the recognition is paused or running
Definition at line 122 of file aruco_marker_recognition.h.
std::string aruco_marker_recognition::ArucoMarkerRecognition::recognizer_name_ [private] |
The name of this recognizer
Definition at line 119 of file aruco_marker_recognition.h.
dynamic_reconfigure::Server<ArucoMarkerRecognitionConfig> aruco_marker_recognition::ArucoMarkerRecognition::reconfigure_server_ [private] |
Dynamic reconfigure server which keeps track of the callback function
Definition at line 98 of file aruco_marker_recognition.h.
ros::ServiceServer aruco_marker_recognition::ArucoMarkerRecognition::release_recognizer_service_ [private] |
Definition at line 95 of file aruco_marker_recognition.h.
Definition at line 114 of file aruco_marker_recognition.h.
boost::shared_ptr<ApproximateSync> aruco_marker_recognition::ArucoMarkerRecognition::sync_policy_ [private] |
The policy the subscribers are synced with
Definition at line 107 of file aruco_marker_recognition.h.
Definition at line 67 of file aruco_marker_recognition.h.
Definition at line 115 of file aruco_marker_recognition.h.