Ask Your Question

How to migrate a catkin workspace?

asked 2014-09-30 20:57:17 -0600

wpd gravatar image

I just upgraded my VM from Ubuntu 12.04 to 14.04, and my ROS installation from Hydro to Indigo.

Now that I've done that, I wonder if there is anything special I need to do to migrate my catkin workspace (which was created initially with Hydro) to Indigo.

I just tried the obvious (I guess I could have tried this _before_ I asked my question, but the end result was about what I expected):

$ source catkin_ws/devel/setup.bash 
$ cd catkin_ws/
$ catkin_make
catkin_make: command not found
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-01 01:06:49 -0600

gvdhoorn gravatar image

updated 2014-10-01 13:19:43 -0600

Now that I've done that, I wonder if there is anything special I need to do to migrate my catkin workspace (which was created initially with Hydro) to Indigo.

tl;dr: remove the devel/ and build/ directories from your catkin_ws/. Remove src/CMakeLists.txt. Then:

source /opt/ros/DISTRO/setup.bash
cd catkin_ws/

Anytime you move a catkin_ws/ directory, it is recommended to remove the devel/ and build/ directories. Files in those dirs (may) contain references to the old location(s) of build artefacts, which, after moving your workspace, has just changed.

Changing between ROS distributions is similar, in that the build/ and devel/ directories contain references to the location(s) of several key binaries, paths and environment variables that (may) have changed. Additionally, the src/ directory should contain a CMakeLists.txt symlink, which points (in your case) to the Hydro version. This should be updated as well. Remove it and invoke catkin_make in your catkin_ws/: the link will be recreated automatically.

edit flag offensive delete link more



I guess a catkin_init_workspace in the catkin_ws/src will be necessary as well; because the prior sym link to top_level cmakelists of hydro distribution will no longer be valid....

Wolf gravatar imageWolf ( 2014-10-01 04:28:43 -0600 )edit

@Wolf, yes, that is probably true. I've updated my answer.

gvdhoorn gravatar imagegvdhoorn ( 2014-10-01 04:56:53 -0600 )edit

Thanks for the answer. That's what I needed. If I hadn't been so lazy and willing to just ask the question, where could I have found that myself?

wpd gravatar imagewpd ( 2014-10-01 07:38:45 -0600 )edit

catkin_make implicitly performs the same logic as catkin_init_workspace. Calling it manually is never necessary.

Dirk Thomas gravatar imageDirk Thomas ( 2014-10-01 12:00:27 -0600 )edit

@Dirk Thomas: I wasn't sure without looking it up. Updated answer again.

gvdhoorn gravatar imagegvdhoorn ( 2014-10-01 13:15:29 -0600 )edit

@wpd: I'm not sure whether this is actually ROS specific. catkin is essentially CMake, so i just used that knowledge and extrapolated a bit.

gvdhoorn gravatar imagegvdhoorn ( 2014-10-01 13:17:32 -0600 )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-09-30 20:57:17 -0600

Seen: 2,615 times

Last updated: Oct 01 '14