0
$\begingroup$

Rosanswers logo

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.


Originally posted by liborw on ROS Answers with karma: 801 on 2013-08-22

Post score: 1


Original comments

Comment by Dirk Thomas on 2013-08-22:
Btw. the invocation of catkin_init_workspace is not necessary. That will be implicitly done by catkin_make.

Comment by liborw on 2013-08-22:
Thanks I didn't know that.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by joq with karma: 25443 on 2013-08-22

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by liborw on 2013-08-22:
I probably wasn't clear so I updated the question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.