34 #ifndef ARUCO_MAPPING_H 35 #define ARUCO_MAPPING_H 46 #include <visualization_msgs/Marker.h> 51 #include <aruco/aruco.h> 52 #include <aruco/cameraparameters.h> 53 #include <aruco/cvdrawingutils.h> 54 #include <aruco/arucofidmarkers.h> 57 #include <opencv2/opencv.hpp> 58 #include <opencv2/core/core.hpp> 59 #include <opencv2/calib3d/calib3d.hpp> 60 #include <opencv2/highgui/highgui.hpp> 63 #include <aruco_mapping/ArucoMarker.h> 97 void imageCallback(
const sensor_msgs::ImageConstPtr &original_image);
108 void publishMarker(geometry_msgs::Pose markerPose,
int MarkerID,
int rank);
123 bool processImage(cv::Mat input_image,cv::Mat output_image);
176 #endif //ARUCO_MAPPING_H static constexpr double RVIZ_MARKER_COLOR_A
ros::Publisher marker_visualization_pub_
Publisher of visualization_msgs::Marker message to "aruco_markers" topic.
ros::Publisher marker_msg_pub_
Publisher of aruco_mapping::ArucoMarker custom message.
static constexpr double WAIT_FOR_TRANSFORM_INTERVAL
Struct to keep marker information.
tf::TransformListener * listener_
static constexpr double THIS_IS_FIRST_MARKER
static constexpr double INIT_MIN_SIZE_VALUE
void publishMarker(geometry_msgs::Pose markerPose, int MarkerID, int rank)
Function to publish all known markers for visualization purposes.
static constexpr double RVIZ_MARKER_COLOR_G
geometry_msgs::Pose geometry_msg_to_world
tf::Transform arucoMarker2Tf(const aruco::Marker &marker)
Compute TF from marker detector result.
geometry_msgs::Pose current_camera_pose
int marker_counter_previous_
tf::StampedTransform tf_to_world
tf::TransformBroadcaster broadcaster_
int closest_camera_index_
Client class for Aruco mapping.
tf::Transform current_camera_tf
tf::StampedTransform tf_to_previous
ArucoMapping(ros::NodeHandle *nh)
Construct a client for EZN64 USB control.
ros::Publisher lidar_camera_calibration_rt
Publisher of std::vector<double> message for tvec and rvec for lidar_camera_calibration.
tf::StampedTransform world_position_transform_
Actual TF of camera with respect to world's origin.
static const int CV_WINDOW_MARKER_LINE_WIDTH
std::string calib_filename_
This class represents a marker. It is a vector of the fours corners ot the marker.
bool parseCalibrationFile(std::string filename)
Function to parse data from calibration file.
Parameters of the camera.
aruco::CameraParameters aruco_calib_params_
static constexpr double RVIZ_MARKER_COLOR_B
geometry_msgs::Pose geometry_msg_to_previous
std::vector< MarkerInfo > markers_
Container holding MarkerInfo data about all detected markers.
static constexpr double RVIZ_MARKER_HEIGHT
geometry_msgs::Pose world_position_geometry_msg_
Actual Pose of camera with respect to world's origin.
static const int CV_WAIT_KEY
bool first_marker_detected_
static constexpr double RVIZ_MARKER_LIFETIME
static constexpr double RVIZ_MARKER_COLOR_R
void imageCallback(const sensor_msgs::ImageConstPtr &original_image)
Callback function to handle image processing.
bool processImage(cv::Mat input_image, cv::Mat output_image)
Process actual image, detect markers and compute poses.
void publishTfs(bool world_option)
Function to publish all known TFs.
static constexpr double BROADCAST_WAIT_INTERVAL