Ask Your Question
1

Groovy and Hydro with same catkin workspace

asked 2014-03-16 22:09:14 -0500

Maya gravatar image

updated 2014-03-16 22:09:43 -0500

Hello folks,

Easy question. I know that I can install Groovy and Hydro at the same time on my computer since they are going to be installed on different folder in /opt. I know I need to source differently depending on which distribution I'm using but can I use the same catkin_ws for Hydro and Groovy at the same time or do I need to have two different workspace like catkin_ws_groovy and catkin_ws_hydro for example ?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2014-03-16 22:11:54 -0500

ahendrix gravatar image

Since a catkin workspace captures the workspace that it was built on top of as part of the build process, you'll need to have two separate workspaces.

edit flag offensive delete link more

Comments

Just as a note: You might want to use symlinks in your src folder to only have one common checkout of your code for both workspaces.

demmeln gravatar imagedemmeln ( 2014-03-20 01:01:39 -0500 )edit
1

answered 2014-03-19 22:12:51 -0500

hamid gravatar image

Note that you might not necessarily be able to run any Groovy program on Hydro (Hydro program on Groovy) but assuming it does, you'd need to build it with your target installation sourced. To clarify, an example where your package is in the directory ~/catkin_workspace:

Every time you want to switch installations you'll need to do all of these:

source /opt/ros/groovy/setup.bash or source /opt/ros/hydro/setup.bash
cd ~/catkin_workspace
rm /devel -r
rm /build -r
catkin_make
source devel/setup.bash
rosrun my_package do_cool_stuff

Note that you need to remove /devel and /build (actually probably just /devel, but I'm not sure about that one) because it contains references to the current installation, ie it is Groovy or Hydro specific.

edit flag offensive delete link more

Comments

you will not want to remove `/build` and `/devel`, those are folders in the root of your file system. I dearly hope you don't have/need those folders and they are user readable. The command is `rm -r build` (no leading slash). `build` will be the more important one to remove (contains build

demmeln gravatar imagedemmeln ( 2014-03-20 00:59:50 -0500 )edit

configuration referencing the underlay), but if you must, remove both to be sure. Note that creating workspaces is so cheap that it is much easier to just have two.

demmeln gravatar imagedemmeln ( 2014-03-20 01:00:38 -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

Stats

Asked: 2014-03-16 22:09:14 -0500

Seen: 200 times

Last updated: Mar 19 '14