spencer-project / spencer_people_tracking

Multi-modal ROS-based people detection and tracking framework for mobile robots developed within the context of the EU FP7 project SPENCER.
http://www.spencer.eu/
656 stars 326 forks source link

Compile errors with opencv #70

Closed fly-duck closed 4 years ago

fly-duck commented 4 years ago

booney@TitanXSLI:~/Myworkspace/spencer-people-tracking-ws$ cd /home/booney/Myworkspace/spencer-people-tracking-ws/build/srl_laser_detectors; catkin build --get-env srl_laser_detectors | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd - -- Using OpenCV version 2.4.9.1 installed at: /usr/include/opencv;/usr/include -- OpenCV supported compute capabilities are: -- OpenCV library status: -- version: 2.4.9.1 -- libraries: opencv_videostab;opencv_video;opencv_superres;opencv_stitching;opencv_photo;opencv_ocl;opencv_objdetect;opencv_ml;opencv_legacy;opencv_imgproc;opencv_highgui;opencv_gpu;opencv_flann;opencv_features2d;opencv_core;opencv_contrib;opencv_calib3d -- include path: /usr/include/opencv;/usr/include -- Using CATKIN_DEVEL_PREFIX: /home/booney/Myworkspace/spencer-people-tracking-ws/devel/.private/srl_laser_detectors -- Using CMAKE_PREFIX_PATH: /home/booney/Myworkspace/spencer-people-tracking-ws/devel;/home/booney/Myworkspace/sample_ws/devel;/home/booney/demo_ws/devel;/home/booney/carto_Ws/install_isolated;/opt/ros/kinetic -- This workspace overlays: /home/booney/Myworkspace/spencer-people-tracking-ws/devel;/home/booney/Myworkspace/sample_ws/devel;/home/booney/demo_ws/devel;/home/booney/carto_Ws/install_isolated;/opt/ros/kinetic -- Using PYTHON_EXECUTABLE: /usr/bin/python -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/booney/Myworkspace/spencer-people-tracking-ws/build/srl_laser_detectors/test_results -- Found gtest: gtests will be built -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.7.14 -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- Configuring done -- Generating done -- Build files have been written to: /home/booney/Myworkspace/spencer-people-tracking-ws/build/srl_laser_detectors [ 0%] Built target spencer_tracking_msgs_generate_messages_py [ 0%] Built target visualization_msgs_generate_messages_nodejs [ 0%] Built target spencer_tracking_msgs_generate_messages_nodejs [ 0%] Built target sensor_msgs_generate_messages_cpp [ 0%] Built target std_msgs_generate_messages_eus [ 0%] Built target roscpp_generate_messages_lisp [ 0%] Built target std_msgs_generate_messages_py [ 0%] Built target rosgraph_msgs_generate_messages_py [ 0%] Built target rosgraph_msgs_generate_messages_lisp [ 0%] Built target roscpp_generate_messages_nodejs [ 0%] Built target rosgraph_msgs_generate_messages_nodejs [ 0%] Built target rosgraph_msgs_generate_messages_cpp [ 0%] Built target sensor_msgs_generate_messages_eus [ 0%] Built target std_msgs_generate_messages_cpp [ 0%] Built target std_msgs_generate_messages_lisp [ 0%] Built target geometry_msgs_generate_messages_lisp [ 0%] Built target visualization_msgs_generate_messages_lisp [ 0%] Built target roscpp_generate_messages_cpp [ 0%] Built target geometry_msgs_generate_messages_eus [ 0%] Built target spencer_tracking_msgs_generate_messages_lisp [ 0%] Built target geometry_msgs_generate_messages_nodejs [ 0%] Built target visualization_msgs_generate_messages_py [ 0%] Built target rosgraph_msgs_generate_messages_eus [ 0%] Built target roscpp_generate_messages_py [ 0%] Built target srl_laser_segmentation_generate_messages_eus [ 0%] Built target sensor_msgs_generate_messages_lisp [ 0%] Built target sensor_msgs_generate_messages_nodejs [ 0%] Built target geometry_msgs_generate_messages_cpp [ 0%] Built target sensor_msgs_generate_messages_py [ 0%] Built target std_msgs_generate_messages_nodejs [ 0%] Built target geometry_msgs_generate_messages_py [ 0%] Built target visualization_msgs_generate_messages_cpp [ 0%] Built target srl_laser_segmentation_generate_messages_cpp [ 0%] Built target roscpp_generate_messages_eus [ 0%] Built target srl_laser_segmentation_generate_messages_lisp [ 0%] Built target srl_laser_segmentation_generate_messages_nodejs [ 0%] Built target srl_laser_segmentation_generate_messages_py [ 0%] Built target spencer_tracking_msgs_generate_messages_cpp [ 0%] Built target visualization_msgs_generate_messages_eus [ 0%] Built target spencer_tracking_msgs_generate_messages_eus Scanning dependencies of target train_detector [ 4%] Building CXX object CMakeFiles/train_detector.dir/src/srl_laser_detectors/ros/nodes/train_detector_node.cpp.o [ 8%] Building CXX object CMakeFiles/train_detector.dir/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp.o In file included from /home/booney/Myworkspace/spencer-people-tracking-ws/src/spencer_people_tracking/detection/laser_detectors/srl_laser_detectors/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp:31:0: /home/booney/Myworkspace/spencer-people-tracking-ws/src/spencer_people_tracking/detection/laser_detectors/srl_laser_detectors/include/srl_laser_detectors/learned_detectors/opencv_detector.h:70:13: error: ‘CvStatModel’ does not name a type virtual CvStatModel getStatModel() = 0; ^ /home/booney/Myworkspace/spencer-people-tracking-ws/src/spencer_people_tracking/detection/laser_detectors/srl_laser_detectors/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp: In member function ‘virtual bool srl_laser_detectors::OpenCvDetector::loadModel(const string&)’: /home/booney/Myworkspace/spencer-people-tracking-ws/src/spencer_people_tracking/detection/laser_detectors/srl_laser_detectors/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp:159:18: error: ‘getStatModel’ was not declared in this scope getStatModel()->read(fileStorage, classifierNode); ^ /home/booney/Myworkspace/spencer-people-tracking-ws/src/spencer_people_tracking/detection/laser_detectors/srl_laser_detectors/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp: In member function ‘virtual bool srl_laser_detectors::OpenCvDetector::saveModel(const string&)’: /home/booney/Myworkspace/spencer-people-tracking-ws/src/spencer_people_tracking/detection/laser_detectors/srl_laser_detectors/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp:177:18: error: ‘getStatModel’ was not declared in this scope getStatModel()->write(fileStorage, "classifier"); ^ CMakeFiles/train_detector.dir/build.make:86: recipe for target 'CMakeFiles/train_detector.dir/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp.o' failed make[2]: [CMakeFiles/train_detector.dir/src/srl_laser_detectors/learned_detectors/opencv_detector.cpp.o] Error 1 CMakeFiles/Makefile2:106: recipe for target 'CMakeFiles/train_detector.dir/all' failed make[1]: [CMakeFiles/train_detector.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2

fly-duck commented 4 years ago

The cmake finds that opencv2 package , but it's still linking against opencv3

fly-duck commented 4 years ago

booney@TitanXSLI:/usr/local/lib$ ls cmake libboost_program_options.so.1.58.0 libopencv_imgcodecs.so libboost_atomic.a libboost_python.a libopencv_imgcodecs.so.3.4 libboost_atomic.so libboost_python.so libopencv_imgcodecs.so.3.4.3 libboost_atomic.so.1.58.0 libboost_python.so.1.58.0 libopencv_imgproc.so libboost_chrono.a libboost_random.a libopencv_imgproc.so.3.4 libboost_chrono.so libboost_random.so libopencv_imgproc.so.3.4.3 libboost_chrono.so.1.58.0 libboost_random.so.1.58.0 libopencv_ml.so libboost_container.a libboost_regex.a libopencv_ml.so.3.4 libboost_container.so libboost_regex.so libopencv_ml.so.3.4.3 libboost_container.so.1.58.0 libboost_regex.so.1.58.0 libopencv_objdetect.so libboost_context.a libboost_serialization.a libopencv_objdetect.so.3.4 libboost_context.so libboost_serialization.so libopencv_objdetect.so.3.4.3 libboost_context.so.1.58.0 libboost_serialization.so.1.58.0 libopencv_photo.so libboost_coroutine.a libboost_signals.a libopencv_photo.so.3.4 libboost_coroutine.so libboost_signals.so libopencv_photo.so.3.4.3 libboost_coroutine.so.1.58.0 libboost_signals.so.1.58.0 libopencv_shape.so libboost_date_time.a libboost_system.a libopencv_shape.so.3.4 libboost_date_time.so libboost_system.so libopencv_shape.so.3.4.3 libboost_date_time.so.1.58.0 libboost_system.so.1.58.0 libopencv_stitching.so libboost_exception.a libboost_test_exec_monitor.a libopencv_stitching.so.3.4 libboost_filesystem.a libboost_thread.a libopencv_stitching.so.3.4.3 libboost_filesystem.so libboost_thread.so libopencv_superres.so libboost_filesystem.so.1.58.0 libboost_thread.so.1.58.0 libopencv_superres.so.3.4 libboost_graph.a libboost_timer.a libopencv_superres.so.3.4.3 libboost_graph.so libboost_timer.so libopencv_videoio.so libboost_graph.so.1.58.0 libboost_timer.so.1.58.0 libopencv_videoio.so.3.4 libboost_iostreams.a libboost_unit_test_framework.a libopencv_videoio.so.3.4.3 libboost_iostreams.so libboost_unit_test_framework.so libopencv_video.so libboost_iostreams.so.1.58.0 libboost_unit_test_framework.so.1.58.0 libopencv_video.so.3.4 libboost_locale.a libboost_wave.a libopencv_video.so.3.4.3 libboost_locale.so libboost_wave.so libopencv_videostab.so libboost_locale.so.1.58.0 libboost_wave.so.1.58.0 libopencv_videostab.so.3.4 libboost_log.a libboost_wserialization.a libopencv_videostab.so.3.4.3 libboost_log_setup.a libboost_wserialization.so libopencv_viz.so libboost_log_setup.so libboost_wserialization.so.1.58.0 libopencv_viz.so.3.4 libboost_log_setup.so.1.58.0 libceres.a libopencv_viz.so.3.4.3 libboost_log.so libgflags.a libprotobuf.a libboost_log.so.1.58.0 libgflags_nothreads.a libprotobuf.la libboost_math_c99.a libglog.a libprotobuf-lite.a libboost_math_c99f.a libglog.la libprotobuf-lite.la libboost_math_c99f.so libglog.so libprotobuf-lite.so libboost_math_c99f.so.1.58.0 libglog.so.0 libprotobuf-lite.so.16 libboost_math_c99l.a libglog.so.0.0.0 libprotobuf-lite.so.16.0.0 libboost_math_c99l.so libopencv_calib3d.so libprotobuf-lite.so.17 libboost_math_c99l.so.1.58.0 libopencv_calib3d.so.3.4 libprotobuf-lite.so.17.0.0 libboost_math_c99.so libopencv_calib3d.so.3.4.3 libprotobuf.so libboost_math_c99.so.1.58.0 libopencv_core.so libprotobuf.so.16 libboost_math_tr1.a libopencv_core.so.3.4 libprotobuf.so.16.0.0 libboost_math_tr1f.a libopencv_core.so.3.4.3 libprotobuf.so.17 libboost_math_tr1f.so libopencv_dnn.so libprotobuf.so.17.0.0 libboost_math_tr1f.so.1.58.0 libopencv_dnn.so.3.4 libprotoc.a libboost_math_tr1l.a libopencv_dnn.so.3.4.3 libprotoc.la libboost_math_tr1l.so libopencv_features2d.so libprotoc.so libboost_math_tr1l.so.1.58.0 libopencv_features2d.so.3.4 libprotoc.so.16 libboost_math_tr1.so libopencv_features2d.so.3.4.3 libprotoc.so.16.0.0 libboost_math_tr1.so.1.58.0 libopencv_flann.so libprotoc.so.17 libboost_prg_exec_monitor.a libopencv_flann.so.3.4 libprotoc.so.17.0.0 libboost_prg_exec_monitor.so libopencv_flann.so.3.4.3 pkgconfig libboost_prg_exec_monitor.so.1.58.0 libopencv_highgui.so python2.7 libboost_program_options.a libopencv_highgui.so.3.4 python3.5 libboost_program_options.so libopencv_highgui.so.3.4.3

fly-duck commented 4 years ago

It includes opencv3 header file

fly-duck commented 4 years ago

In file included from /usr/local/include/opencv2/ml/ml.hpp:48:0 why does that include the opencv header file in /usr/local instead of the /usr/include

fly-duck commented 4 years ago

I just remove all opencv files in /usr/local/include then the it will include /usr/include/opencv