Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check for OpenCV 3.(2+) #10

Closed
wants to merge 1 commit into from

Conversation

JStech
Copy link
Contributor

@JStech JStech commented Jul 2, 2020

When building with OpenCV 3.4, the target markers fail with this error:

moveit_calibration/moveit_calibration_plugins/handeye_calibration_target/src/handeye_target_charuco.cpp:196:17: 
    error: ‘struct cv::aruco::DetectorParameters’ has no member named ‘cornerRefinementMethod’; did you mean 
    ‘cornerRefinementWinSize’?
 params_ptr->cornerRefinementMethod = cv::aruco::CORNER_REFINE_NONE;

This is because the correct code for OpenCV 3.4 is guarded by preprocessor checks that specifically look for 3.2. This PR just switches that check to pass for any minor version >=2. (Related to #5 .)

Copy link
Member

@AndyZe AndyZe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with OpenCV 3.2 and it fixed a build error. 👍

Did not test functionality.

Copy link
Member

@AndyZe AndyZe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there was an issue (I forgot to remove a CATKIN_IGNORE file from the package). I seem to still have a build error.

@JStech
Copy link
Contributor Author

JStech commented Jul 2, 2020

Well, now I'm all confused. It does look like 3.2.0 uses the doCornerRefinement parameter, but 3.4.5 uses cornerRefinementMethod, but this change does seem to fix a build on 3.4 for us. I'm going to close this PR for now.

@JStech JStech closed this Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants