Ask Your Question
4

Catkin includes system packages before overlay

asked 2012-11-09 20:36:08 -0500

Ibrahim gravatar image

updated 2012-11-09 20:47:17 -0500

Hi all,

I'm not sure if I'm supposed to be using catkin yet but I figure it can't hurt to get a little ahead of the curve, especially since I'm trying to work with some stuff from Groovy (moveit). I've been trying to set up a workspace for catkin to overlay the most recent code from github over the debs and I'm having trouble compiling moveit_core because it's getting the system version of srdfdom even though I've overlayed a version from git in my workspace instead. This is the smallest .rosinstall that exhibits the problem:

- git: {local-name: src/srdfdom, uri: 'https://github.com/ros-planning/srdfdom.git'}
- git: {local-name: src/moveit_core, uri: 'https://github.com/ros-planning/moveit-core.git'}

I have been following the tutorials from here: http://www.ros.org/wiki/catkin/Tutorials/catkin_groovy_workspace

This is the output of make VERBOSE=1 for the file that fails to compile because it's looking at the wrong header:

cd /home/ibrahima/tmp/catkin_ws/build/moveit_core/kinematic_model && /usr/bin/c++   -Dmoveit_kinematic_model_EXPORTS -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"moveit_core\" -Droscpp_VERSION_MAJOR=1 -Droscpp_VERSION_MINOR=9 -Droscpp_VERSION_PATCH=30 -fPIC -isystem /usr/include/eigen3 -I/opt/ros/groovy/include -I/home/ibrahima/tmp/catkin_ws/src/srdfdom/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/kinematics_base/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/kinematic_model/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/kinematic_state/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/collision_detection/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/collision_detection_fcl/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/kinematic_constraints/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/planning_scene/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/constraint_samplers/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/planning_interface/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/planning_request_adapter/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/trajectory_processing/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/distance_field/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/collision_distance_field/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/kinematics_metrics/include -I/home/ibrahima/tmp/catkin_ws/src/moveit_core/dynamics_solver/include    -o CMakeFiles/moveit_kinematic_model.dir/src/kinematic_model.cpp.o -c /home/ibrahima/tmp/catkin_ws/src/moveit_core/kinematic_model/src/kinematic_model.cpp

The errors are things like /home/ibrahima/tmp/catkin_ws/src/moveit_core/kinematic_model/src/kinematic_model.cpp:271:22: error: ‘const struct srdf::Model::EndEffector’ has no member named ‘parent_group_’ because the packaged version is missing this field but the overlay version has it (there are also some unrelated bugs that I think are just typos/things forgotten from refactoring or renaming stuff).

It seems like /opt/ros/groovy/include is included before the overlay packages even though that shouldn't be the case. It seems like I'm having the same problem as this issue https://github.com/ros/catkin/issues/200 but that was fixed. What can I do to try to resolve this? Thanks!

Edit: Here's my ROS related environment variables (gathered from env | grep ros which I have aliased as rosenv by the way; might be a useful alias ... (more)

edit retag flag offensive close merge delete

Comments

Catkin issue #200 was closed 8 days ago. Are you sure that fix is included in the version your are testing?

joq gravatar imagejoq ( 2012-11-10 03:16:48 -0500 )edit

Well, I saw that the issue was closed but the point was that I seemed to be experiencing the same symptoms. As you can see in the verbose make output the CFLAGs includes /opt/ros/groovy before the local workspace which I thought was not the desired behavior. The version I have is 0.5.46.

Ibrahim gravatar imageIbrahim ( 2012-11-12 12:22:49 -0500 )edit

According to git that version should have the fix so I'll try to start again from a clean workspace, although I've done this about 6 times already I may have messed up following some of the instructions each time :/

Ibrahim gravatar imageIbrahim ( 2012-11-12 12:23:37 -0500 )edit

Actually when I run cmake ../src from the build directory I see catkin 0.5.51. Either way I think the problem might just be with the CMakeLists.txt of some components of moveit and not my workspace, not 100% sure. That's what I get for trying to play with ROS components on the bleeding edge ;)

Ibrahim gravatar imageIbrahim ( 2012-11-12 12:31:47 -0500 )edit

Actually sorry to keep spamming but to be clear I'm having two separate issues, one that I hacked around by removing the system version of a header and one that I haven't been able to resolve, and I may have been conflating them in these comments.

Ibrahim gravatar imageIbrahim ( 2012-11-12 13:15:50 -0500 )edit

The ROS_PACKAGE_PATH looks wrong. Have you manually set that? If you have sourced the devl/setup.* file in your workspace the RPP should include your source folder of the workspace and /opt/ros/groovy/share|stacks.

Dirk Thomas gravatar imageDirk Thomas ( 2012-11-13 10:09:57 -0500 )edit

I didn't do anything manual after sourcing setup.bash. Although to be honest when I posted this I tried a lot of different things so it's possible that I sourced the wrong file when I first posted.

Ibrahim gravatar imageIbrahim ( 2012-11-13 18:57:42 -0500 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2012-11-12 08:37:52 -0500

mirzashah gravatar image

I was the one that posted issue number 200 on github. This has been fixed as joq stated (at least for me) and I have not re-encountered the issue. Can you confirm you have the latest packages? Note that catkin is a work in progress so you have to pull packages from the shadow-fixed repository and not the normal public repository.

Also, did you source the correct setup file? If you use catkin_init_workspace in your overlay workspace, then either:

1) source setup.bash in build/develspace/

OR

2)

make install

source install/setup.bash

Both will automatically overlay your workspace on top of the system installed /opt/ros/groovy as it recognizes catkin is in /opt/ros/groovy. Even if you sourced another file, the appropriate environment variables will be overwritten.

Oh and also, in catkin, the variable ROS_PACKAGE_PATH is mainly there for backwards compatibility. What is important with catkin is the CMAKE_PREFIX_PATH variable, please makes sure to note the value of that as well.

edit flag offensive delete link more

Comments

Thanks, I'll try again and let you know what happens. I actually sourced the setup.sh (also tried setup.bash) from the root of the catkin workspace, maybe that's the issue? This is helpful though either way, I didn't know which env variables were important here.

Ibrahim gravatar imageIbrahim ( 2012-11-12 12:25:25 -0500 )edit

CMAKE_PREFIX_PATH=/home/ibrahima/tmp/catkin_ws/build/devel:/opt/ros/groovy

Ibrahim gravatar imageIbrahim ( 2012-11-12 13:03:39 -0500 )edit

I forgot to ask the most important thing, what version of catkin do you have installed? Either tell me the .deb package version or the output when you invoke cmake. cmake should print catkin version as one of the first things it does when you invoke it.

mirzashah gravatar imagemirzashah ( 2012-11-12 13:33:54 -0500 )edit

The output when you invoke cmake is 0.5.51 although dpkg -s tells me 0.5.46. I imagine the cmake output is correct though? By the way, it seems that sourcing the file in install/ does put the right things in CMAKE_PREFIX_PATH so I think this is the right solution. Buildspace one doesnt work though.

Ibrahim gravatar imageIbrahim ( 2012-11-12 17:14:32 -0500 )edit

The output when you invoke cmake is 0.5.51 although dpkg -s tells me 0.5.46. I imagine the cmake output is correct though?

Ibrahim gravatar imageIbrahim ( 2012-11-12 17:14:37 -0500 )edit

Having two different versions of catkin suggests that you have catkin 0.5.46 installed and catkin 0.5.51 as a checked out in your workspace. You should not need to checkout catkin in your workspace when you have it installed.

Dirk Thomas gravatar imageDirk Thomas ( 2012-11-13 10:05:55 -0500 )edit

If you don't have catkin in the workspace you should double check your installed debian packages since the information is bogus. May be you have installed a previous workspace with catkin to /opt/ros/groovy?

Dirk Thomas gravatar imageDirk Thomas ( 2012-11-13 10:06:50 -0500 )edit

Oh right, I do have a copy of catkin in my workspace, sorry about that. I think the reason I did that was because I think in the version from the debian package catkin_create_pkg is missing some template files or something like that.

Ibrahim gravatar imageIbrahim ( 2012-11-13 18:59:34 -0500 )edit
1

answered 2012-11-10 01:34:10 -0500

Lorenz gravatar image

Overlays do not work the same way as in Fuerte anymore. Have a look at the catkin tutorials to find out more about how to set up a catkin workspace and how to compile packages for it. Note that catkin and the tutorials are still work in progress and things might change.

Essentially, you will have to create a catkin workspace using catkin_init_workspace, put your packages into it, create a build directory, call cmake and then make.

edit flag offensive delete link more

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

Stats

Asked: 2012-11-09 20:36:08 -0500

Seen: 514 times

Last updated: Nov 12 '12