Closed ruksen25 closed 5 years ago
A long time ago, I used to require people to manually input the directory to where they installed OpenPose. I believe the op namespace functions may be caused by linking errors. Take a look at my CMakeLists.txt back then: https://github.com/firephinx/openpose_ros/blob/44d35c1fefdfe8ff25a7ba40ad1cbc84e0a7befb/CMakeLists.txt.
You might need to add the following lines to the CMakeLists.txt: set(OPENPOSE_DIR /path/to/openpose) set(OPENPOSE_INCLUDE_DIRS ${OPENPOSE_DIR}/include) set(OPENPOSE_LINK_LIBRARY ${OPENPOSE_DIR}/build/lib/libopenpose.so)
target_link_libraries(${PROJECT_NAME}_node ${catkin_LIBRARIES} ${OpenCV_LIBS} ${OPENPOSE_LINK_LIBRARY} ${GFLAGS_LIBRARY} ${GLOG_LIBRARY} )
Thank you very much for your reply. Your CMakeList.txt file was very helpful, and now I am able to compile.
Great!
Hi: I am met the same problem
CMake Error at openpose_ros/openpose_ros/CMakeLists.txt:34 (find_package): By not providing "FindOpenPose.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenPose", but CMake did not find one.
Could not find a package configuration file provided by "OpenPose" with any of the following names:
OpenPoseConfig.cmake openpose-config.cmake
Add the installation prefix of "OpenPose" to CMAKE_PREFIX_PATH or set "OpenPose_DIR" to a directory containing one of the above files. If "OpenPose" provides a separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred! See also "/home/i2rlab/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/i2rlab/catkin_ws/build/CMakeFiles/CMakeError.log". Makefile:8914: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed
And I have followed your instruction, but I still get error like this
In file included from /home/i2rlab/catkin_ws/src/openpose_ros/openpose_ros/src/openpose_ros_node.cpp:22:0: /home/i2rlab/catkin_ws/src/openpose_ros/openpose_ros/include/openpose.h:7:32: fatal error: openpose/headers.hpp: No such file or directory compilation terminated. openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/build.make:62: recipe for target 'openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose_ros_node.cpp.o' failed make[2]: [openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose_ros_node.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /home/i2rlab/catkin_ws/src/openpose_ros/openpose_ros
/src/openpose_ros_io.cpp:1:0:
/home/i2rlab/catkin_ws/src/openpose_ros/openpose_ros/include/openpose_ros_io.h:13:43: fatal error: openpose_ros_msgs/BoundingBox.h: No such file or directory compilation terminated. openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/build.make:110: recipe for target 'openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose_ros_io.cpp.o' failed make[2]: [openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose_ros_io.cpp.o] Error 1 CMakeFiles/Makefile2:16582: recipe for target 'openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/all' failed make[1]: [openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j12 -l12" failed (base) i2rlab@i2rlab:~/catkin_ws$
I have installed OpenPose before this repo and It's very struggle so I don't want to re-install it again. But I want to publish the json file result to my ros node and read the position information through ros. Do you think now my question is because the API in openpose cannot support to this repo?
Thanks, Gloria
@Gloriabhsfer Has this been solved?
Can you update the CMakelist please
@ruksen25 Hi sorry for the late update, my problem was already been solved by reinstall the openpose. Thanks for asking.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(/usr/bin/python3 "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py" "/opt/ros/kinetic/share/catkin/cmake/../package.xml" "/home/evadro/catkin_ws/build/catkin/catkin_generated/version/package.cmake") returned error code 1 Call Stack (most recent call first): /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:74 (safe_execute_process) /opt/ros/kinetic/share/catkin/cmake/all.cmake:168 (_catkin_package_xml) /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:56 (find_package)
-- Configuring incomplete, errors occurred! See also "/home/evadro/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/evadro/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed please help
Hi I get trouble when running catkin_make in my catkin ws. The issue seems to be related to it not being able to identify the openpose package.
The terminal output just before and as the error occurs looks like this:
+++ processing catkin package: 'openpose_ros_msgs' -- ==> add_subdirectory(ergoadapt/services/openpose_ros/openpose_ros_msgs) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- openpose_ros_msgs: 4 messages, 0 services -- +++ processing catkin package: 'openpose_ros' -- ==> add_subdirectory(ergoadapt/services/openpose_ros/openpose_ros) -- Found OpenCV: /opt/ros/kinetic (found version "3.3.1") -- Found GFlags: /usr/include
-- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so) -- Found Glog: /usr/include
-- Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so) CMake Error at ergoadapt/services/openpose_ros/openpose_ros/CMakeLists.txt:23 (find_package): By not providing "FindOpenPose.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenPose", but CMake did not find one.
Could not find a package configuration file provided by "OpenPose" with any of the following names:
Add the installation prefix of "OpenPose" to CMAKE_PREFIX_PATH or set "OpenPose_DIR" to a directory containing one of the above files. If "OpenPose" provides a separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred! See also "/home/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed
I have changed the path in gflags_options.cpp as you specified.
The only difference between your guide and what I did - that I can think of - is that I installed Openpose using the .sh file in the scripts/ubuntu_deprecated folder. (and I am seemingly not able to do make install in the build folder after that installation) The reason I install from the .sh files is that I am working with a Docker container. I am installing using the 2268242 commit as you suggest.
Do you have any idea what I could do to make the package visible to my ws?
I tried simply taking out the find_package and manually provide the paths to the openpose folders (include, src and lib). When I do that, it comes further in the compilation but complains that some "op" namespace functions are undefined.
Any help or creative ideas will be appreciated.