# rosws: Managing multiple workspaces with the same repository in place

I'd like to use rosws to manage multiple workspaces for convenience. Let's say I have repositories 1,2,3,4 and two workspaces ws1 using 1,2,3 and ws2 using 1,2,4.

What I would like to have is a setup, where I can use rosws as usual with all its features, but 1,2,3,4 are only checked out, build, etc. to one location on the harddisk. (Checking that they are used consistently together is obv. up to the user).

I'm wondering if that is possible somehow as I have only been able to come up with two solution that work half-way.

1. Just use the normal way of pointing rosws to the remote location.
+ Everything works as expected
- Repository 1,2 are checked out once for each workspace and have to be (re-)built independently

2. Set rosws entries by just passing the path (like one would pass /opt/ros/fuerte)
+ ROS_PACKAGE_PATH, etc. are set properly by rosws, only one location per repository
- rosws update doesn't work (I tried fiddling in repository URLs unsuccessfully)

edit retag close merge delete

Sort by » oldest newest most voted

This would be technically feasible like this:

• ws1
• .rosinstall
• repo1
• repo2
• ws2
• .rosinstall

in ws2/.rosinstall, you would have elements with relative path local-name, like

- hg:
local-name: ../ws1/repo1
uri: xyz
version: abc
- git:
local-name: ../ws1/repo2
...


Depending on what you are trying to achieve, this might be okay. rosws update should work. However the different localnames are a bit ugly, so this is not a perfect solution.

If you like to hack, you could modify rosinstall/rosws to use a param or read an ENV var to determine the config filename to use, such as

\$ export ROSINSTALL_CONFIG_FILENAME=...


Then you could have two different config files in the same workspace folder, which would better capture the semantics of what you explained.

EDIT: On Unix/linux plattforms you can also use softlinks to mirror a directory structure

• ws1
• .rosinstall
• repo1
• repo2
• ws2
• .rosinstall
• repo1 -> ../ws1/repo1

Then the .rosinstall files would look identical for the entries they share.

BTW, using 'other' elements tells rosws to ignore an entry for update.

more