Error installing pr2_mechanism_model package

asked 2016-09-05 05:18:22 -0500

lucadg gravatar image

Hi guys, I am following actually the first tutorial in order to run my pr2. I tried to execute the first two commands in the tutorial but it seems I've missed some packages. So I have started to install few of them.

Now I've run again catkin_make install and I am getting this errors:

/home/lucadg/catkin_ws/src/pr2_controller_manager/src/controller_manager.cpp:833:1:   required from here
/home/lucadg/catkin_ws/src/hardware_interface/include/hardware_interface/internal/interface_manager.h:194:21: error: no matching function for call to ‘pr2_mechanism_model::RobotState::RobotState()’
         iface_combo = new T;
In file included from /home/lucadg/catkin_ws/src/pr2_controller_interface/include/pr2_controller_interface/controller.h:46:0,
                 from /home/lucadg/catkin_ws/src/pr2_controller_manager/include/pr2_controller_manager/controller_spec.h:40,
                 from /home/lucadg/catkin_ws/src/pr2_controller_manager/include/pr2_controller_manager/controller_manager.h:39,
                 from /home/lucadg/catkin_ws/src/pr2_controller_manager/src/controller_manager.cpp:31:
/home/lucadg/catkin_ws/src/pr2_mechanism_model/include/pr2_mechanism_model/robot.h:130:3: note: candidate: pr2_mechanism_model::RobotState::RobotState(pr2_mechanism_model::Robot*)
   RobotState(Robot *model);
/home/lucadg/catkin_ws/src/pr2_mechanism_model/include/pr2_mechanism_model/robot.h:130:3: note:   candidate expects 1 argument, 0 provided
/home/lucadg/catkin_ws/src/pr2_mechanism_model/include/pr2_mechanism_model/robot.h:126:7: note: candidate: pr2_mechanism_model::RobotState::RobotState(const pr2_mechanism_model::RobotState&)
 class RobotState : public hardware_interface::HardwareInterface
/home/lucadg/catkin_ws/src/pr2_mechanism_model/include/pr2_mechanism_model/robot.h:126:7: note:   candidate expects 1 argument, 0 provided
[ 88%] Building CXX object controller_manager_tests/CMakeFiles/controller_manager_tests.dir/src/pos_eff_controller.cpp.o
pr2_controller_manager/CMakeFiles/pr2_controller_manager.dir/build.make:62: recipe for target 'pr2_controller_manager/CMakeFiles/pr2_controller_manager.dir/src/controller_manager.cpp.o' failed
make[2]: *** [pr2_controller_manager/CMakeFiles/pr2_controller_manager.dir/src/controller_manager.cpp.o] Error 1
CMakeFiles/Makefile2:10101: recipe for target 'pr2_controller_manager/CMakeFiles/pr2_controller_manager.dir/all' failed
make[1]: *** [pr2_controller_manager/CMakeFiles/pr2_controller_manager.dir/all] Error 2
[ 88%] Building CXX object controller_manager_tests/CMakeFiles/controller_manager_tests.dir/src/my_dummy_controller.cpp.o
[ 90%] Building CXX object controller_manager_tests/CMakeFiles/controller_manager_tests.dir/src/pos_eff_opt_controller.cpp.o
[ 90%] Building CXX object controller_manager_tests/CMakeFiles/controller_manager_tests.dir/src/vel_eff_controller.cpp.o
[ 90%] Linking CXX shared library /home/lucadg/catkin_ws/devel/lib/
[ 90%] Built target controller_manager_tests
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make install -j4 -l4" failed

It looks like is in the compilation of the robot.h file. Anyone able to help?

Thank you in advance

edit retag flag offensive close merge delete


Could you add some links to the "first tutorial" that you are following? Also: your version of ROS and how you installed it (using apt-get, or built from source) would be nice to know.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-05 05:58:16 -0500 )edit

Yes, sorry I have been to generic. My ROS' version is kinetic and I have installed it using apt-get. I was following the tutorial Starting PR2 in Simulation I have executed those two commands and then installed packages missed around in order to start with PR2.

lucadg gravatar image lucadg  ( 2016-09-05 08:56:56 -0500 )edit

The pr2_simulator package (and many (all?) of the other PR2 pkgs) haven't been released for Kinetic (Indigo is the newest release). I don't think it's such a surprise that there may be issues trying to build this from source on Kinetic. That's not to say it's impossible though.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-05 09:34:54 -0500 )edit

I think doing this on Indigo will be much easier, but if you must use Kinetic, the best course of action is probaby to figure out what interface_manager.h is doing exactly on line 194, and try to find a Kinetic compatible replacement / adaptation for that.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-05 09:40:21 -0500 )edit

lucadg, did you succeed?, how did you solve it? I am having exact same error now.. thanks!

mape1082 gravatar image mape1082  ( 2016-12-24 12:19:42 -0500 )edit

Hi lucadg. How did you solve this problem. Because of my project, I also want to use pr2 on kinetic. Can you share the solution

doras gravatar image doras  ( 2017-07-31 08:23:11 -0500 )edit