Ask Your Question
1

Catkin and overlays

asked 2013-08-22 02:36:01 -0600

liborw gravatar image

updated 2013-08-22 21:40:00 -0600

Just to recap the workspace_overlaying tutorial, I have two catkin based workspaces catkin_A and catkin_B. I want to configure them so that the catkin_A overlays ROS standard packages and catkin_B overlays catkin_A. Assuming that both have been properly initialised and filled with packages as follows

$ source /opt/ros/hydro/setup.bash
$ mkdir -p ~/catkin_X/src
$ cd ~/catkin_X/src; catkin_init_workspace

So to set up the overlay structure i do

$ source /opt/ros/hydro/setup.bash
$ cd ~/catkin_A
$ catkin_make

and

$ source ~/catkin_A/devel/setup.bash
$ cd ~/catkin_B
$ catkin_make

In order to use the catkin_B workspace I have to source $ source ~/catkin_B/devel/setup.bash. The $ source ~/catkin_A/devel/setup.bash is the crucial part as the tutorial says the question is do I have to do it every time I call catkin_make in the catkin_B to clear the catkin_B from environment?

How about catkin_make in catkin_A if I have previously used catkin_B do I have to `source /opt/ros/hydro/setup.bash'?

I'm asking this question as the overlay setup gets broken from time to time, rosrun starts looking in /opt/ros/hydro for nodes that should be overlaid in catkin_A.

edit retag flag offensive close merge delete

Comments

Btw. the invocation of catkin_init_workspace is not necessary. That will be implicitly done by catkin_make.

Dirk Thomas gravatar imageDirk Thomas ( 2013-08-22 07:10:43 -0600 )edit

Thanks I didn't know that.

liborw gravatar imageliborw ( 2013-08-22 21:33:22 -0600 )edit

1 Answer

Sort by ┬╗ oldest newest most voted
0

answered 2013-08-22 05:07:26 -0600

joq gravatar image

No. It sets bash environment variables.

You need to run it once for each time you open a new shell (or terminal). If you almost always use catkin_B, just source it in your ~/.bashrc, which automatically runs each time you open a new shell.

edit flag offensive delete link more

Comments

I probably wasn't clear so I updated the question.

liborw gravatar imageliborw ( 2013-08-22 21:34:21 -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

3 followers

Stats

Asked: 2013-08-22 02:36:01 -0600

Seen: 648 times

Last updated: Aug 22 '13