firephinx / openpose_ros

ROS Catkin package wrapper for the OpenPose library from https://github.com/CMU-Perceptual-Computing-Lab/openpose.
55 stars 44 forks source link

Error when compiling due to openpose wrapper #8

Closed JaviLaplaza closed 5 years ago

JaviLaplaza commented 5 years ago

Hi, I was trying to use your node but I'm facing some issues with the compilation. Here are the steps I have been following:

  1. I downloaded and installed OpenPose latest version https://github.com/CMU-Perceptual-Computing-Lab/openpose and proceeded with the installation, which I think is fine since I can run the examples.

  2. I downloaded your repo and changed the parameters and image topic name as said in the readme.

  3. When I run catkin_make in my catkin_workspace I get the following output:

jlaplaza@romo4:~/catkin_ws$ catkin_make --only-pkg-with-deps=openpose_ros Base path: /home/jlaplaza/catkin_ws Source space: /home/jlaplaza/catkin_ws/src Build space: /home/jlaplaza/catkin_ws/build Devel space: /home/jlaplaza/catkin_ws/devel Install space: /home/jlaplaza/catkin_ws/install Whitelisted packages: openpose_ros, openpose_ros_msgs

Running command: "cmake /home/jlaplaza/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/jlaplaza/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/jlaplaza/catkin_ws/install -DCATKIN_WHITELIST_PACKAGES=openpose_ros;openpose_ros_msgs -G Unix Makefiles" in "/home/jlaplaza/catkin_ws/build"

. . .

[ 82%] Built target openpose_ros_msgs_generate_messages [ 85%] Building CXX object openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose.cpp.o [ 89%] Building CXX object openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose_ros_node.cpp.o [ 92%] Building CXX object openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose_ros_io.cpp.o [ 96%] Building CXX object openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/gflags_options.cpp.o /home/jlaplaza/catkin_ws/src/openpose_ros/openpose_ros/src/openpose.cpp: In constructor ‘openpose_ros::OpenPose::OpenPose()’: /home/jlaplaza/catkin_ws/src/openpose_ros/openpose_ros/src/openpose.cpp:37:115: error: no matching function for call to ‘op::WrapperStructOutput::WrapperStructOutput(double&, fLS::clstring&, op::DataFormat, fLS::clstring&, fLS::clstring&, fLS::clstring&, google::int32&, fLS::clstring&, fLS::clstring&, fLS::clstring&, double&, bool&, fLS::clstring&, fLS::clstring&, fLS::clstring&, fLS::clstring&, fLS::clstring&, fLS::clstring&, fLS::clstring&)’ FLAGS_write_video_adam, FLAGS_write_bvh, FLAGS_udp_host, FLAGS_udp_port) ^ In file included from /usr/local/include/openpose/wrapper/wrapper.hpp:12:0, from /usr/local/include/openpose/wrapper/headers.hpp:6, from /usr/local/include/openpose/headers.hpp:47, from /home/jlaplaza/catkin_ws/src/openpose_ros/openpose_ros/include/openpose.h:7, from /home/jlaplaza/catkin_ws/src/openpose_ros/openpose_ros/src/openpose.cpp:1: /usr/local/include/openpose/wrapper/wrapperStructOutput.hpp:150:9: note: candidate: op::WrapperStructOutput::WrapperStructOutput(double, const string&, op::DataFormat, const string&, const string&, int, int, const string&, const string&, const string&, double, bool, const string&, const string&, const string&, const string&, const string&, const string&, const string&) WrapperStructOutput( ^ /usr/local/include/openpose/wrapper/wrapperStructOutput.hpp:150:9: note: no known conversion for argument 6 from ‘fLS::clstring {aka std::__cxx11::basic_string}’ to ‘int’ /usr/local/include/openpose/wrapper/wrapperStructOutput.hpp:13:19: note: candidate: op::WrapperStructOutput::WrapperStructOutput(const op::WrapperStructOutput&) struct OP_API WrapperStructOutput ^ /usr/local/include/openpose/wrapper/wrapperStructOutput.hpp:13:19: note: candidate expects 1 argument, 19 provided /usr/local/include/openpose/wrapper/wrapperStructOutput.hpp:13:19: note: candidate: op::WrapperStructOutput::WrapperStructOutput(op::WrapperStructOutput&&) /usr/local/include/openpose/wrapper/wrapperStructOutput.hpp:13:19: note: candidate expects 1 argument, 19 provided openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/build.make:86: recipe for target 'openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose.cpp.o' failed make[2]: [openpose_ros/openpose_ros/CMakeFiles/openpose_ros_node.dir/src/openpose.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... CMakeFiles/Makefile2:1743: 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

I think that recently the code was updated to support the latest OpenPose version, is this error due to some mismatch between different versions of OpenPose or am I missing something?

Extra information

The installation of both OpenPose and this node have been performed twice in 2 different platforms: a NVidia Jetson TX2 and a normal desktop computer, bot with Ubuntu 16.04 (the TX2 is flashed with JetPack 3.3). Both installations lead to the same output.

Thanks for your work!

kowac commented 5 years ago

Came across the exact same error just 5 minutes ago. I am thankful for any information that directs towards the solution.

firephinx commented 5 years ago

Hello both of you guys, I updated this to the f4984c0 version of OpenPose which is 16 commits behind the current master version. If you need to use this immediately, I suggest cloning OpenPose and then doing git checkout f4984c0 and then recompiling everything and then it should work. It might take me a bit to update to the current master version of OpenPose because they modified their API again.

JaviLaplaza commented 5 years ago

Hi @firephinx , I tried using OpenPose version f4984c0 and now everything works fine, thank you so much.

By the way, remember to uninstall your current OpenPose version before you install this specific version or you might encounter some issues (like experiencing the same error due to the system finding the master OpenPose version instead of the f4984c0 version).

firephinx commented 5 years ago

Hello @JaviLaplaza, I fixed the differences in the API and now it works with the current master version of OpenPose. I will be closing the issue now. Thanks.