RIVeR-Lab / apriltags_ros

AprilTags for ROS
http://wiki.ros.org/apriltags_ros
83 stars 101 forks source link

cv::Exception during Tag detection #32

Closed jocacace closed 6 years ago

jocacace commented 6 years ago

Hi Guys,

I am addressing and issue using the last version of the opencv in ROS repositories (v3.3.1) and apriltags. What happen is that, when a tag has been detected by my camera, the following error is shown:

OpenCV Error: Assertion failed (mtype == type0 || (((((mtype) & ((512 - 1) << 3)) >> 3) + 1) == 1 && ((1 << type0) & fixedDepthMask) != 0)) in create, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 2542 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:2542: error: (-215) mtype == type0 || (((((mtype) & ((512 - 1) << 3)) >> 3) + 1) == 1 && ((1 << type0) & fixedDepthMask) != 0) in function create I am using Ubuntu 16.04.3 and ROS kinetic I tryed to investigate a bit and the problem seems to be generated in the cv::SolvePnp function in TagDetection.cc source file.

Any suggestion?

Cheers,

Aurelem commented 6 years ago

@jocacace look at the pull Fix for OpenCV 3.3.1 it's what you need

Cheers

Crobisaur commented 6 years ago

Please pull this fix, we encountered a similar issue and took a while to reach this conclusion.

velinddimitrov commented 6 years ago

Sorry, I started a new job and haven't been following Github. I merged the fix in.