wg-perception / ork_renderer

4 stars 30 forks source link

Can not catkin_make this package #16

Closed TrinhNC closed 7 years ago

TrinhNC commented 7 years ago

When I run catkin_make I always face this problem. Anyone knows why?

CMakeFiles/trainer_planar.dir/trainer_planar.cpp.o: In function `main':
trainer_planar.cpp:(.text.startup+0xcd): undefined reference to `cv::linemod::getDefaultLINE()'
trainer_planar.cpp:(.text.startup+0x3e0): undefined reference to `cv::Rodrigues(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&)'
trainer_planar.cpp:(.text.startup+0x99c): undefined reference to `cv::linemod::Detector::addTemplate(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, std::string const&, cv::Mat const&, cv::Rect_<int>*)'
trainer_planar.cpp:(.text.startup+0xc7e): undefined reference to `cv::linemod::Detector::writeClasses(std::string const&) const'
trainer_planar.cpp:(.text.startup+0xf76): undefined reference to `cv::linemod::Detector::match(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, float, std::vector<cv::linemod::Match, std::allocator<cv::linemod::Match> >&, std::vector<std::string, std::allocator<std::string> > const&, cv::_OutputArray const&, std::vector<cv::Mat, std::allocator<cv::Mat> > const&) const'
trainer_planar.cpp:(.text.startup+0x12fa): undefined reference to `cv::linemod::Detector::getTemplates(std::string const&, int) const'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/tu/catkin_ws/devel/lib/object_recognition_renderer/trainer_planar] Error 1
make[1]: *** [ork/src/ork_renderer/src/apps/CMakeFiles/trainer_planar.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
TrinhNC commented 7 years ago

It does not fix the problem. I still get the same error while catkin_make.

vrabaud commented 7 years ago

ok, which OS, Ubuntu release ? Which packages do you have in your workspace ?

TrinhNC commented 7 years ago

Hi, I'm using Ubuntu 14.04. Here is the list of packages in workspace:

vrabaud commented 7 years ago

what does "make VERBOSE=1" returns ?

TrinhNC commented 7 years ago

I run "make VERBOSE=1" in the build folder and here is the result:

-- Using CATKIN_DEVEL_PREFIX: /home/tu/catkin_ws/src/ork/devel
-- Using CMAKE_PREFIX_PATH: /home/tu/catkin_ws/src/ork/devel;/home/tu/catkin_ws/devel;/opt/ros/indigo;/home/tu/opencv-2.4.11
-- This workspace overlays: /home/tu/catkin_ws/src/ork/devel;/home/tu/catkin_ws/devel;/opt/ros/indigo
-- 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/tu/catkin_ws/src/ork/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.19
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 11 packages in topological order:
-- ~~  - object_recognition_msgs
-- ~~  - object_recognition_renderer
-- ~~  - object_recognition_core
-- ~~  - object_recognition_capture
-- ~~  - object_recognition_linemod
-- ~~  - object_recognition_reconstruction
-- ~~  - object_recognition_ros
-- ~~  - object_recognition_tod
-- ~~  - object_recognition_transparent_objects
-- ~~  - object_recognition_ros_visualization
-- ~~  - object_recognition_tabletop
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'object_recognition_msgs'
-- ==> add_subdirectory(object_recognition_msgs)
-- Using these message generators: gencpp;genlisp;genpy
-- Generating .msg files for action object_recognition_msgs/ObjectRecognition /home/tu/catkin_ws/src/ork/src/object_recognition_msgs/action/ObjectRecognition.action
-- object_recognition_msgs: 13 messages, 1 services
-- +++ processing catkin package: 'object_recognition_renderer'
-- ==> add_subdirectory(ork_renderer)
-- Boost version: 1.54.0
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- Using GLUT
-- checking for module 'assimp'
--   found assimp, version 3.0.1264
-- Found assimp v3
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- +++ processing catkin package: 'object_recognition_core'
-- ==> add_subdirectory(object_recognition_core)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   serialization
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- Boost version: 1.54.0
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   serialization
--   thread
--   filesystem
--   regex
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- Eigen found (include: /usr/include/eigen3)
-- +++ processing catkin package: 'object_recognition_capture'
-- ==> add_subdirectory(capture)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Boost version: 1.54.0
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- +++ processing catkin package: 'object_recognition_linemod'
-- ==> add_subdirectory(linemod)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- +++ processing catkin package: 'object_recognition_reconstruction'
-- ==> add_subdirectory(reconstruction)
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   iostreams
--   serialization
--   chrono
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- looking for PCL_COMMON
-- looking for PCL_KDTREE
-- looking for PCL_OCTREE
-- looking for PCL_SEARCH
-- looking for PCL_SURFACE
-- looking for PCL_SAMPLE_CONSENSUS
-- looking for PCL_IO
-- looking for PCL_FILTERS
-- looking for PCL_FEATURES
-- looking for PCL_GEOMETRY
-- looking for PCL_KEYPOINTS
-- looking for PCL_REGISTRATION
-- looking for PCL_SEGMENTATION
-- looking for PCL_RECOGNITION
-- looking for PCL_VISUALIZATION
-- looking for PCL_PEOPLE
-- looking for PCL_OUTOFCORE
-- looking for PCL_TRACKING
-- looking for PCL_APPS
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so  
-- Eigen found (include: /usr/include/eigen3)
-- +++ processing catkin package: 'object_recognition_ros'
-- ==> add_subdirectory(object_recognition_ros)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.6") 
-- Using these message generators: gencpp;genlisp;genpy
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   serialization
-- Eigen found (include: /usr/include/eigen3)
-- +++ processing catkin package: 'object_recognition_tod'
-- ==> add_subdirectory(tod)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   serialization
-- Eigen found (include: /usr/include/eigen3)
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- +++ processing catkin package: 'object_recognition_transparent_objects'
-- ==> add_subdirectory(transparent_objects)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   iostreams
--   serialization
--   chrono
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- looking for PCL_COMMON
-- looking for PCL_KDTREE
-- looking for PCL_OCTREE
-- looking for PCL_SEARCH
-- looking for PCL_SURFACE
-- looking for PCL_SAMPLE_CONSENSUS
-- looking for PCL_IO
-- looking for PCL_FILTERS
-- looking for PCL_FEATURES
-- looking for PCL_GEOMETRY
-- looking for PCL_KEYPOINTS
-- looking for PCL_REGISTRATION
-- looking for PCL_SEGMENTATION
-- looking for PCL_RECOGNITION
-- looking for PCL_VISUALIZATION
-- looking for PCL_PEOPLE
-- looking for PCL_OUTOFCORE
-- looking for PCL_TRACKING
-- looking for PCL_APPS
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so  
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   program_options
--   signals
Include dir: ON
-- OpenCV found at /home/tu/opencv-2.4.11
-- +++ processing catkin package: 'object_recognition_ros_visualization'
-- ==> add_subdirectory(object_recognition_ros_visualization)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.6") 
-- Using these message generators: gencpp;genlisp;genpy
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   serialization
-- +++ processing catkin package: 'object_recognition_tabletop'
-- ==> add_subdirectory(tabletop)
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   python
--   thread
--   system
-- Using these message generators: gencpp;genlisp;genpy
-- Eigen found (include: /usr/include/eigen3)
-- Building assimp v3
-- Boost version: 1.54.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tu/catkin_ws/src/ork/build
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectRecognitionResult
[  0%] Built target shape_msgs_generate_messages_py
[  0%] Built target geometry_msgs_generate_messages_py
[  0%] Built target actionlib_msgs_generate_messages_py
[  0%] Built target std_msgs_generate_messages_py
[  0%] Built target sensor_msgs_generate_messages_py
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectRecognitionAction
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_RecognizedObject
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_Table
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectRecognitionActionGoal
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_GetObjectInformation
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectInformation
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_TableArray
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectRecognitionGoal
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectRecognitionActionResult
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_RecognizedObjectArray
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectType
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectRecognitionFeedback
[  0%] Built target _object_recognition_msgs_generate_messages_check_deps_ObjectRecognitionActionFeedback
[  4%] Built target object_recognition_msgs_generate_messages_py
[  4%] Built target actionlib_msgs_generate_messages_cpp
[  4%] Built target std_msgs_generate_messages_cpp
[  4%] Built target sensor_msgs_generate_messages_cpp
[  4%] Built target shape_msgs_generate_messages_cpp
[  4%] Built target geometry_msgs_generate_messages_cpp
[  9%] Built target object_recognition_msgs_generate_messages_cpp
[  9%] Built target shape_msgs_generate_messages_lisp
[  9%] Built target actionlib_msgs_generate_messages_lisp
[  9%] Built target geometry_msgs_generate_messages_lisp
[  9%] Built target sensor_msgs_generate_messages_lisp
[  9%] Built target std_msgs_generate_messages_lisp
[ 13%] Built target object_recognition_msgs_generate_messages_lisp
[ 13%] Built target object_recognition_msgs_generate_messages
[ 14%] Built target object_recognition_renderer_2d
[ 15%] Built target object_recognition_renderer_3d
[ 15%] Built target view_generator
Linking CXX executable /home/tu/catkin_ws/src/ork/devel/lib/object_recognition_renderer/trainer_planar
CMakeFiles/trainer_planar.dir/trainer_planar.cpp.o: In function `main':
/home/tu/catkin_ws/src/ork/src/ork_renderer/src/apps/trainer_planar.cpp:78: undefined reference to `cv::linemod::getDefaultLINE()'
/home/tu/catkin_ws/src/ork/src/ork_renderer/src/apps/trainer_planar.cpp:92: undefined reference to `cv::Rodrigues(cv::_InputArray const&, cv::_OutputArray const&, cv::_OutputArray const&)'
/home/tu/catkin_ws/src/ork/src/ork_renderer/src/apps/trainer_planar.cpp:102: undefined reference to `cv::linemod::Detector::addTemplate(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, std::string const&, cv::Mat const&, cv::Rect_<int>*)'
/home/tu/catkin_ws/src/ork/src/ork_renderer/src/apps/trainer_planar.cpp:111: undefined reference to `cv::linemod::Detector::writeClasses(std::string const&) const'
/home/tu/catkin_ws/src/ork/src/ork_renderer/src/apps/trainer_planar.cpp:122: undefined reference to `cv::linemod::Detector::match(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, float, std::vector<cv::linemod::Match, std::allocator<cv::linemod::Match> >&, std::vector<std::string, std::allocator<std::string> > const&, cv::_OutputArray const&, std::vector<cv::Mat, std::allocator<cv::Mat> > const&) const'
/home/tu/catkin_ws/src/ork/src/ork_renderer/src/apps/trainer_planar.cpp:127: undefined reference to `cv::linemod::Detector::getTemplates(std::string const&, int) const'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/tu/catkin_ws/src/ork/devel/lib/object_recognition_renderer/trainer_planar] Error 1
make[1]: *** [ork_renderer/src/apps/CMakeFiles/trainer_planar.dir/all] Error 2
make: *** [all] Error 2
vrabaud commented 7 years ago

You have your own OpenCV installed here: /home/tu/opencv-2.4.11 This is not supported with ROS (it works, I just won't debug it for you). This is now a standard C++ issue.

TrinhNC commented 7 years ago

I run the linemod detection and it works. Does it mean the error is not a problem and I could ignore it?

vrabaud commented 7 years ago

well no, if it cannot compile, then it cannot work ... not sure of which version you are running then. Maybe you have a package around ?

TrinhNC commented 7 years ago

I don't have any other package. I'm pretty sure that I'm running on this package because I'm working with Kinect v2, so I have to modify the detection file in conf folder before running detection command. Otherwise it would not work. This is quite weird.

TrinhNC commented 7 years ago

Ah, I remember that I first use catkin_make without ork_render and linemod package in the workspace, then I copy them to ws and catkin_make again. It shows 100% on linemod package but the error like above still shows up in the end.

TrinhNC commented 6 years ago

@vrabaud "You have your own OpenCV installed here: /home/tu/opencv-2.4.11 This is not supported with ROS (it works, I just won't debug it for you)." what do you mean by not supported with ROS? Should I install another version of OpenCV, 'cuz the problem is not fixed yet!