ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
OK. I think I have figured it out. It turns out the raw images being published by raspicam_node are mirrowed. That's why the tagcode can't be identified. So I change line 55-59 in apriltag_detector.cpp:
cv::Mat gray;
cv::cvtColor(cv_ptr->image, gray, CV_BGR2GRAY);
std::vector<AprilTags::TagDetection> detections = tag_detector_->extractTags(gray);
to
cv::Mat gray, gray_fliped;
cv::cvtColor(cv_ptr->image, gray, CV_BGR2GRAY);
cv::flip(gray,gray_fliped, 1);
std::vector<AprilTags::TagDetection> detections = tag_detector_->extractTags(gray_fliped);
My solution is more like a patch. I would love to know if I can filp the raw images using the launch file for raspicam_node.