Closed jpapon closed 8 years ago
+1 This seems right, though it might be a little tricky to merge/release because fixing it has the potential of breaking existing systems.
We could make it a parameter to switch between the existing implementation and projection matrix values implementation. Thoughts?
Sure. It's not exactly ideal but seems like the best option available. The parameter can be removed (or its default value flipped) if a release for kinetic ever happens.
I will work on a release next.
I noticed that the apriltag detector uses the camera intrinsic focal lengths and principal point, rather than the projection matrix in solvePnP : https://github.com/RIVeR-Lab/apriltags_ros/blob/indigo-devel/apriltags_ros/src/apriltag_detector.cpp#L83-L84 https://github.com/RIVeR-Lab/apriltags_ros/blob/indigo-devel/apriltags/src/TagDetection.cc#L95-L98
Is this correct? We're using rectified images here (thus the zero'd distortion coefficients), so it seems the projection matrix values make more sense. Often this isn't much of a problem, but for wide FOV cameras and/or april tags on the edge of the image, there is some difference.
In my own experiments, I found using projection matrix values gave substantially more accurate pose values - especially in distance to the markers.
The change to fix this would be simple - just switch from using:
to