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

How exactly does .rosinstall work?

asked 2011-02-26 03:38:26 -0600

Eponymous gravatar image

I'm a bit unclear on how .rosinstall works.

I realize that a standard version gets installed when I first installed ros (though I'm not sure whether easyinstall or rosinstall does that). A couple of things I don't quite understand:

  1. How do upgrades work? Do the .rosinstall file need to be manually edited to change a version number? (Some of the packages in .rosinstall don't have version numbers, so how does that work?) Or does the rosinstall command somehow take care of updates? I can also use svn directly to upgrade certain packages, but then will re-running rosinstall not revert those upgrades by over-writing the svn ugrades?

  2. If I want to use rosinstall to install other packages, how should I do that? Create another .rosinstall file with a different name or add new lines to the existing .rosinstall? And if I do make another .rosinstall, can I use the rosinstall command for one and not adversely affect the other set of installed packages?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
10

answered 2011-02-26 04:37:09 -0600

Tully gravatar image

updated 2011-02-26 12:27:11 -0600

tfoote gravatar image

The .rosinstall file is generated when rosinstall is executed. (Except the .rosinstall files in /opt/ros/*/.rosinstall are generated by the debbuilding infrastructure.)

1) When executed rosinstall will generate a new .rosinstall which is the union of the existing .rosinstall and rosinstall files on the command line. Before writing out the .rosinstall file the entries will be deduplicated based on local-name. If you run rosinstall . it will make sure that you have exactly what's listed in the .rosinstall file, with the same version as listed. If you change the .rosinstall file manually before executing it will follow the edited version. If you have changed an svn checkout manually it will try to return the checkout to the version in the .rosinstall file, unless you change the .rosinstall file to correspond. (PS rosinstall version 0.5.15 has an interactive skip option to not change a locally changed checkout)

The recommended way to update is to call `rosinstall . "updated_rosinstall_file"

where updated_rosinstall_file would be something manually maintained or a generated file like "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=diamondback&variant=desktop-full&overlay=no" The new rules for each local-name will override the corresponding old rules.

2) Similarly to updating to add a package or stacks to an existing rosinstalled directory, just pass a rosinstall file with those packages to rosinstall rosinstall . new_packages.rosinstall and they will be added to the .rosinstall in directory "."

Adding the lines to .rosinstall is also valid. Then rerun rosinstall like this rosinstall .

To add build a rosinstall on top of another one without changing an existing checkout you will want to use another directory. Then you can use rosinstall . /other_checkout/path local.rosinstall as long as /other_checkout/path contains a .rosinstall file. This will add the contents of the /othere_checkout/path as "other" elements in the .rosinstall file in "."

As always later arguments will be earlier on the ROS_PACKAGE_PATH.

edit flag offensive delete link more

Comments

Very helpful! rosinstall help says that the command format is "rosinstall PATH [URI] [options]" but it looks like it's "rosinstall MAIN-ROSINSTALL-PATH PATH [URI] [options]" There are certainly two paths in the command you give: . and /other_checkout/path
Eponymous gravatar image Eponymous  ( 2011-02-26 05:49:02 -0600 )edit
Another question as I continue to think about this: if I do update my .rosinstall by the recommended method you give, what happens exactly? Is .rosinstall replaced or are only the corresponding lines replaced (determined by local, I imagine)?
Eponymous gravatar image Eponymous  ( 2011-02-26 06:15:10 -0600 )edit
I've updated the answer for the correspondance. A path is a subset of a uri. You can pass n many of them into rosinstall. I've updated the usage to use [URI]...
tfoote gravatar image tfoote  ( 2011-02-26 12:37:01 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2011-02-26 03:38:26 -0600

Seen: 12,669 times

Last updated: Feb 26 '11