Ask Your Question

cmake error: attempt to add link library

asked 2014-07-11 16:47:32 -0500

Wedontplay gravatar image

Hi, as starting point to work with Moveit and my custom robot i downloaded and modified


i put the folder in my catkin workspace under /src, renamed everything according to my robot and used a lot of examples.

Now i need to launch some original pr2 tutorial so i downloaded same package again this time i left everything intact but when i launch catkin_make i get lot's linking errors like this one:

CMake Error at moveit_pr2-hydro-devel/pr2_moveit_tutorials/planning/CMakeLists.txt:18 (target_link_libraries): Attempt to add link library "/opt/ros/hydro/lib/" to target "move_group_interface_tutorial" which is not built in this directory.

If I delete the modified package version I use with my custom robot everything compile fine but then i can't launch the examples anymore. If I launch

rospack find pr2_moveit_tutorials

I see correctly:


but when I launch the tutorial with:

roslaunch pr2_moveit_tutorials motion_planning_interface_tutorial.launch

I get this error:

[motion_planning_interface_tutorial.launch] is neither a launch file in package [pr2_moveit_tutorials] nor is [pr2_moveit_tutorials] a launch file name

What am I missing? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-13 04:02:08 -0500

DevonW gravatar image

updated 2014-07-13 04:14:50 -0500

When installing from source, be sure that all the dependencies it requires are either installed in your ROS ecosystem or are also being compiled from source.

When trying to use programs installed by source, you'll also have to source that workspace by

source devel/setup.bash

And when wanting to specify something installed in the ROS ecosystem at /opt/ros/hydro/*

source /opt/ros/hydro/setup.bash

Cheers, Devon

edit flag offensive delete link more


Thank you, actually the second problem was caused just by a mispelling, the launch file mentioned in the tutorial "Motion Planners/C++ API" has a different name in the pr_2_moveit_tutorials package. real launch file is: motion_planning_api_tutorial.launch.

Wedontplay gravatar image Wedontplay  ( 2014-07-14 06:54:17 -0500 )edit

Great! Could you please file an issue so that this can be patched in the future? I would greatly appreciate your support :D Is this ticket solved now?

DevonW gravatar image DevonW  ( 2014-07-14 10:55:48 -0500 )edit

issue created, yes it is solved. Thank you for your support. G.

Wedontplay gravatar image Wedontplay  ( 2014-07-17 02:32:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-07-11 16:47:32 -0500

Seen: 3,597 times

Last updated: Jul 13 '14