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

Revision history [back]

click to hide/show revision 1
initial version

Given that you have a base ROS installed, lets say to ~/hydro/install, with the sources in ~/hydro/src, which was generated from a rosinstall_generator command like rosinstall_generator desktop_full --rosdistro hydro --deps --wet-only > hydro-desktop-full-wet.rosinstall. In order to update this install I would do the following:

$ mv hydro-desktop-full-wet.rosinstall hydro-desktop-full-wet.rosinstall.old
$ rosinstall_generator desktop_full --rosdistro hydro --deps --wet-only > hydro-desktop-full-wet.rosinstall
$ diff hydro-desktop-full-wet.rosinstall.old hydro-desktop-full-wet.rosinstall

On my machine I get something like this:

% diff hydro-desktop-full-wet.rosinstall.old hydro-desktop-full-wet.rosinstall
412c412
<     version: release/hydro/orocos_kdl/1.2.0-1
---
>     version: release/hydro/orocos_kdl/1.2.1-0
952c952
<     version: release/hydro/urdf_tutorial/0.2.1-0
---
>     version: release/hydro/urdf_tutorial/0.2.2-0
956c956
<     version: release/hydro/urdfdom/0.2.8-1
---
>     version: release/hydro/urdfdom/0.2.10-3

This tells me that those three packages have new versions, then you can use wstool to update your ~/hydro/src folder:

$ wstool merge -t src hydro-desktop-full-wet.rosinstall

     Change details of element (Use --merge-keep or --merge-replace to change):
  orocos_kdl,  urdf_tutorial,  urdfdom

Continue: (y)es, (n)o, (v)erbosity, (a)dvanced options: y
Config changed, maybe you need run wstool update to update SCM entries.
Overwriting /Users/william/hydro/src/.rosinstall

update complete.

The above command will have updated the .rosinstall file in the ~/hydro/src folder, grep shows me that orocos has indeed been updated:

% cat src/.rosinstall | grep orocos
- git: {local-name: orocos_kdl, uri: 'https://github.com/smits/orocos-kdl-release.git',
    version: release/hydro/orocos_kdl/1.2.1-0}

At this point though, you have not updated the source code you have, to do this you must use wstool again:

% wstool up -t src

The above command will check each entry in the .rosinstall against the thing in the source folder. When it finds an inconsistency, it will ask your what you want to do:

Prepare updating https://github.com/ros-gbp/catkin-release.git (version release/hydro/catkin/0.5.77-0) to /Users/william/hydro/src/catkin
Url https://github.com/ros/catkin does not match https://github.com/ros-gbp/catkin-release.git requested.
  (d)elete and replace, (a)bort, (b)ackup and replace, (s)kip: s
Skipping install of catkin because: Url https://github.com/ros/catkin does not match https://github.com/ros-gbp/catkin-release.git requested.

I have a custom version of catkin which I do not want to update, so I'll skip that one. Packages which are new will be fetched, I had removed opencv2, so it re-fetched that:

[opencv2] Fetching https://github.com/ros-gbp/opencv2-release.git (version release/hydro/opencv2/2.4.6-3) to /Users/william/hydro/src/opencv2

Finally it gets to orocos_kdl and updates it:

[orocos_kdl] Updating /Users/william/hydro/src/orocos_kdl
remote: Counting objects: 227, done.
remote: Compressing objects: 100% (119/119), done.
remote: Total 189 (delta 66), reused 187 (delta 64)
Receiving objects: 100% (189/189), 20.61 KiB | 0 bytes/s, done.
Resolving deltas: 100% (66/66), completed with 16 local objects.
From https://github.com/smits/orocos-kdl-release
   b198d62..8909a85  debian/hydro/orocos_kdl -> origin/debian/hydro/orocos_kdl
   321632a..fa9be31  debian/hydro/precise/orocos_kdl -> origin/debian/hydro/precise/orocos_kdl
   eeb590d..e81a661  debian/hydro/precise/python_orocos_kdl -> origin/debian/hydro/precise/python_orocos_kdl
   aac5a5b..6f3732f  debian/hydro/python_orocos_kdl -> origin/debian/hydro/python_orocos_kdl
   707290a..43eb2ee  debian/hydro/quantal/orocos_kdl -> origin/debian/hydro/quantal/orocos_kdl
   784f63b..4b422b5  debian/hydro/quantal/python_orocos_kdl -> origin/debian/hydro/quantal/python_orocos_kdl
   9e30d46..be57517  debian/hydro/raring/orocos_kdl -> origin/debian/hydro/raring/orocos_kdl
   dd3ea36..83cb73b  debian/hydro/raring/python_orocos_kdl -> origin/debian/hydro/raring/python_orocos_kdl
   cd114b1..66acb41  master     -> origin/master
   3f2c2a6..82391b6  patches/debian/hydro/orocos_kdl -> origin/patches/debian/hydro/orocos_kdl
   b4da946..f2bd89f  patches/debian/hydro/precise/orocos_kdl -> origin/patches/debian/hydro/precise/orocos_kdl
   3e61cee..44e58b9  patches/debian/hydro/precise/python_orocos_kdl -> origin/patches/debian/hydro/precise/python_orocos_kdl
   517103d..d44ddf6  patches/debian/hydro/python_orocos_kdl -> origin/patches/debian/hydro/python_orocos_kdl
   02f4013..b2cf5d4  patches/debian/hydro/quantal/orocos_kdl -> origin/patches/debian/hydro/quantal/orocos_kdl
   9f1f5ec..67a0eac  patches/debian/hydro/quantal/python_orocos_kdl -> origin/patches/debian/hydro/quantal/python_orocos_kdl
   7917a14..c038702  patches/debian/hydro/raring/orocos_kdl -> origin/patches/debian/hydro/raring/orocos_kdl
   5d92f2a..45fbe18  patches/debian/hydro/raring/python_orocos_kdl -> origin/patches/debian/hydro/raring/python_orocos_kdl
   f9a1676..39b40d9  patches/release/hydro/orocos_kdl -> origin/patches/release/hydro/orocos_kdl
   f946058..71c4b15  patches/release/hydro/python_orocos_kdl -> origin/patches/release/hydro/python_orocos_kdl
   2d94e1c..2c5d3a2  release/hydro/orocos_kdl -> origin/release/hydro/orocos_kdl
   2468f71..84e236b  release/hydro/python_orocos_kdl -> origin/release/hydro/python_orocos_kdl
   bb592b5..ae2dc7c  upstream   -> origin/upstream
 * [new tag]         debian/ros-hydro-orocos-kdl_1.2.1-0_precise -> debian/ros-hydro-orocos-kdl_1.2.1-0_precise
 * [new tag]         debian/ros-hydro-orocos-kdl_1.2.1-0_quantal -> debian/ros-hydro-orocos-kdl_1.2.1-0_quantal
 * [new tag]         debian/ros-hydro-orocos-kdl_1.2.1-0_raring -> debian/ros-hydro-orocos-kdl_1.2.1-0_raring
 * [new tag]         debian/ros-hydro-python-orocos-kdl_1.2.1-0_precise -> debian/ros-hydro-python-orocos-kdl_1.2.1-0_precise
 * [new tag]         debian/ros-hydro-python-orocos-kdl_1.2.1-0_quantal -> debian/ros-hydro-python-orocos-kdl_1.2.1-0_quantal
 * [new tag]         debian/ros-hydro-python-orocos-kdl_1.2.1-0_raring -> debian/ros-hydro-python-orocos-kdl_1.2.1-0_raring
 * [new tag]         release/hydro/orocos_kdl/1.2.1-0 -> release/hydro/orocos_kdl/1.2.1-0
 * [new tag]         release/hydro/python_orocos_kdl/1.2.1-0 -> release/hydro/python_orocos_kdl/1.2.1-0
 * [new tag]         upstream/1.2.1 -> upstream/1.2.1
[orocos_kdl] Done.

Once that command finishes you can run catkin_make_isolated --install --force-cmake to rebuild and re-install the new and updated packages.

This is the workflow I would use if I just updated often, but I rebuild the whole thing so frequently that I just start with a fresh workspace.