Error Compiling Global Hypothesis Verification

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Compiling Global Hypothesis Verification

beaverfan
I'm trying to follow the tutorial on Global Hypothesis Verification and I'm having a compile issue:

[100%] Building CXX object CMakeFiles/global_hypothesis_verification.dir/src/global_hypothesis_verification.cpp.o
In file included from /home/taylor/src/global_hypothesis_verification/src/global_hypothesis_verification.cpp:47:0:
/usr/include/pcl-1.7/pcl/recognition/hv/hv_go.h:14:27: fatal error: metslib/mets.hh: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/global_hypothesis_verification.dir/src/global_hypothesis_verification.cpp.o] Error 1
make[1]: *** [CMakeFiles/global_hypothesis_verification.dir/all] Error 2
make: *** [all] Error 2

I'm installed PCL 1.7 from binaries on Ubuntu 12.04.  I "think" I installed metslib from source and it still gives me the error.

Any help in troubleshooting would be great. I have exhausted my ideas.

Cheers
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling Global Hypothesis Verification

VictorLamoine
Administrator
Hello,

I tried to compile PCL trunk from sources with "recognition" enabled and metslib installed from sources, this is the error that I get:
In file included from /usr/local/include/metslib-0.5/metslib/mets.hh:129:0,
                 from /home/dell/pcl/recognition/include/pcl/recognition/hv/hv_go.h:14,
                 from /home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp:40,
                 from /home/dell/pcl/recognition/src/hv/hv_go.cpp:37:
/usr/local/include/metslib-0.5/metslib/model.hh:98:5: warning: unused parameter ‘os’ [-Wunused-parameter]
     print(std::ostream& os) const { };
     ^
In file included from /usr/local/include/metslib-0.5/metslib/mets.hh:129:0,
                 from /home/dell/pcl/recognition/include/pcl/recognition/hv/hv_go.h:14,
                 from /home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp:40,
                 from /home/dell/pcl/recognition/src/hv/hv_go.cpp:37:
/usr/local/include/metslib-0.5/metslib/model.hh:644:10: warning: unused parameter ‘s’ [-Wunused-parameter]
     void refresh(mets::feasible_solution& s) { }
          ^
/usr/local/include/metslib-0.5/metslib/model.hh:670:5: warning: unused parameter ‘s’ [-Wunused-parameter]
     refresh(mets::feasible_solution& s)
     ^
In file included from /usr/local/include/metslib-0.5/metslib/mets.hh:130:0,
                 from /home/dell/pcl/recognition/include/pcl/recognition/hv/hv_go.h:14,
                 from /home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp:40,
                 from /home/dell/pcl/recognition/src/hv/hv_go.cpp:37:
/usr/local/include/metslib-0.5/metslib/termination-criteria.hh:224:5: warning: unused parameter ‘fs’ [-Wunused-parameter]
     operator()(const feasible_solution& fs)
     ^
In file included from /usr/local/include/metslib-0.5/metslib/mets.hh:134:0,
                 from /home/dell/pcl/recognition/include/pcl/recognition/hv/hv_go.h:14,
                 from /home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp:40,
                 from /home/dell/pcl/recognition/src/hv/hv_go.cpp:37:
/usr/local/include/metslib-0.5/metslib/simulated-annealing.hh:157:5: warning: unused parameter ‘fs’ [-Wunused-parameter]
     operator()(double temp, feasible_solution& fs)
     ^
/usr/local/include/metslib-0.5/metslib/simulated-annealing.hh:172:5: warning: unused parameter ‘fs’ [-Wunused-parameter]
     operator()(double temp, feasible_solution& fs)
     ^
In file included from /home/dell/pcl/recognition/src/hv/hv_go.cpp:37:0:
/home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp: In instantiation of ‘void pcl::GlobalHypothesesVerification<ModelT, SceneT>::SAOptimize(std::vector<int>&, std::vector<bool>&) [with ModelT = pcl::PointXYZ; SceneT = pcl::PointXYZ]’:
/home/dell/pcl/recognition/src/hv/hv_go.cpp:42:21:   required from here
/home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp:451:3: error: ‘class mets::simulated_annealing<pcl::GlobalHypothesesVerification<pcl::PointXYZ, pcl::PointXYZ>::move_manager>’ has no member named ‘setApplyAndEvaluate’
   sa.setApplyAndEvaluate(true);
   ^
/home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp: In instantiation of ‘void pcl::GlobalHypothesesVerification<ModelT, SceneT>::SAOptimize(std::vector<int>&, std::vector<bool>&) [with ModelT = pcl::PointXYZRGB; SceneT = pcl::PointXYZRGB]’:
/home/dell/pcl/recognition/src/hv/hv_go.cpp:43:21:   required from here
/home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp:451:3: error: ‘class mets::simulated_annealing<pcl::GlobalHypothesesVerification<pcl::PointXYZRGB, pcl::PointXYZRGB>::move_manager>’ has no member named ‘setApplyAndEvaluate’
/home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp: In instantiation of ‘void pcl::GlobalHypothesesVerification<ModelT, SceneT>::SAOptimize(std::vector<int>&, std::vector<bool>&) [with ModelT = pcl::PointXYZRGBA; SceneT = pcl::PointXYZRGBA]’:
/home/dell/pcl/recognition/src/hv/hv_go.cpp:44:21:   required from here
/home/dell/pcl/recognition/include/pcl/recognition/impl/hv/hv_go.hpp:451:3: error: ‘class mets::simulated_annealing<pcl::GlobalHypothesesVerification<pcl::PointXYZRGBA, pcl::PointXYZRGBA>::move_manager>’ has no member named ‘setApplyAndEvaluate’
make[2]: *** [recognition/CMakeFiles/pcl_recognition.dir/src/hv/hv_go.cpp.o] Erreur 1
make[2]: *** Attente des tâches non terminées....
I guess you have to compile PCL from sources and track down the errors in compilation.
For your information: pcl/recognition/include/pcl/recognition/3rdparty/metslib/mets.hh

If you find a fix, please share it here or create a pull request.

Bye
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling Global Hypothesis Verification

Chisel
This post has NOT been accepted by the mailing list yet.
In reply to this post by beaverfan
Change the head #include "metslib/mets.hh" in hv_go.h to #include "pcl/recognition/3rdparty/metslib/mets.hh" can make this program work.
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling Global Hypothesis Verification

Chisel
This post has NOT been accepted by the mailing list yet.
In reply to this post by VictorLamoine
i'm not sure what pull a request is and how to do it, so i remind you here
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling Global Hypothesis Verification

beaverfan
In reply to this post by Chisel
I was having issues with this even after I changed the #include.  However I think it was because I didn't do a full sudo make install after I made the change.  I just did a 'make'

It compiled. Thanks for the help.
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling Global Hypothesis Verification

Ber461
Apparently, when you run "sudo make install" on PCL, pcl/recognition/3rdparty/metslib/ does not get copied to /usr/include/ like it should, I dunno why. In order to compile the example I had to manually copy it, and also change the #include directive as mentioned.
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling Global Hypothesis Verification

Bidski
I was still getting this problem with the latest version of the git repo.

I made a pull request
Reply | Threaded
Open this post in threaded view
|

Re: Error Compiling Global Hypothesis Verification

MD NURUL KARIM
This post has NOT been accepted by the mailing list yet.
Hello, I faced the same problem.
But it could be solve same way as correspondence-grouping  

//#include <pcl/filters/uniform_sampling.h>         instead
#include <pcl/keypoints/uniform_sampling.h>

and
//
  //  Downsample Clouds to Extract keypoints
  //

  pcl::UniformSampling<PointType> uniform_sampling;
  uniform_sampling.setInputCloud (model);
  uniform_sampling.setRadiusSearch (model_ss_);
  //uniform_sampling.filter (*model_keypoints);
  pcl::PointCloud<int> keypointIndices1;
  uniform_sampling.compute(keypointIndices1);
  pcl::copyPointCloud(*model, keypointIndices1.points, *model_keypoints);
  std::cout << "Model total points: " << model->size () << "; Selected Keypoints: " << model_keypoints->size () << std::endl;


  uniform_sampling.setInputCloud (scene);
  uniform_sampling.setRadiusSearch (scene_ss_);
  //uniform_sampling.filter (*scene_keypoints);
  pcl::PointCloud<int> keypointIndices2;
  uniform_sampling.compute(keypointIndices2);
  pcl::copyPointCloud(*scene, keypointIndices2.points, *scene_keypoints);
  std::cout << "Scene total points: " << scene->size () << "; Selected Keypoints: " << scene_keypoints->size () << std::endl;

this also you replace in old file..
it detects milk pack