ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Catkin and overlays

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

liborw gravatar image

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

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 image Dirk Thomas  ( 2013-08-22 07:10:43 -0500 )edit

Thanks I didn't know that.

liborw gravatar image liborw  ( 2013-08-22 21:33:22 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

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

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 image liborw  ( 2013-08-22 21:34:21 -0500 )edit

Question Tools

3 followers

Stats

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

Seen: 1,015 times

Last updated: Aug 22 '13