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 <a href="https://github.com/ros-gbp/catkin-release.git">https://github.com/ros-gbp/catkin-release.git</a> (version release/hydro/catkin/0.5.77-0) to /Users/william/hydro/src/catkin
Url <a href="https://github.com/ros/catkin">https://github.com/ros/catkin</a> does not match <a href="https://github.com/ros-gbp/catkin-release.git">https://github.com/ros-gbp/catkin-release.git</a> requested.
(d)elete and replace, (a)bort, (b)ackup and replace, (s)kip: s
Skipping install of catkin because: Url <a href="https://github.com/ros/catkin">https://github.com/ros/catkin</a> does not match <a href="https://github.com/ros-gbp/catkin-release.git">https://github.com/ros-gbp/catkin-release.git</a> 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 <a href="https://github.com/ros-gbp/opencv2-release.git">https://github.com/ros-gbp/opencv2-release.git</a> (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 ...
(more)
Noone? There must be a ton of people having pure source-installs, no?