Ask Your Question
1

rosws: Managing multiple workspaces with the same repository in place

asked 2012-08-29 01:42:51 -0500

dornhege gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2012-08-29 02:01:37 -0500

KruseT gravatar image

updated 2012-08-29 02:09:54 -0500

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-08-29 01:42:51 -0500

Seen: 514 times

Last updated: Aug 29 '12