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

How to distribute changes of packages to all involved machines?

asked 2011-07-27 11:25:26 -0600

updated 2012-01-19 04:26:15 -0600

Usually we program on a workstation, but our nodes have to run on other machines. For example on a robot or some nodes on a robot and some other nodes on 2 further workstations (because of expensive computations). To start such a node network, we are able to use launch-files. But which way is the best to distribute changes of packages to all involved machines during the development and testing of code (if the code is stable we could commit it to a SVN repository). I would like to specify the involved machines (robots, other workstations) in a environment variable and after a rosmake [mypackage] all machines should have the newest code. Thanks!

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
1

answered 2011-08-11 02:13:37 -0600

updated 2012-01-19 07:16:50 -0600

Now, I use a bash script with rsync and environment variables. It works fine and also with eclipse(it calls rosmake first, so I use it as build command). If I get a karma>20 I will upload it here. THX

EDIT:

Here ist the Script: http://www.is.uni-due.de/fileadmin/user_upload/korn/isrosmake

This Script distributes changes of packages to all involved machines. All dependencies of the target package (and including the target package), that are located in $HOME/ros are synchronized (rsync) with the other machines. The target machines are configured by environment variables (e.g. IS_MACHINE1, IS_MACHINE2, ...)(You can use this environment variables in launch files, too).

edit flag offensive delete link more
4

answered 2011-07-27 20:42:21 -0600

We use svn and a structure of trunk (stable) - branches (unstable). (Which is not very easy to work with, I have to say)
Maybe the solution you are asking for would be a little script that for each machine, connects to it (via ssh, for example), updates the code (svn-branch) and compiles it (rosmake).

edit flag offensive delete link more

Comments

THX. I think SVN isn't a good solution because I'm talking about a short testing of new code. Commit and update take too much time, if this happens every 15 minutes. Further this code is high experimental and nobody else should use it.(e.g. testing of hard-coded parameters, runtime errors)
MichaelKorn gravatar image MichaelKorn  ( 2011-07-27 23:00:39 -0600 )edit
Then maybe a distributed VCS could help. With git or mercurial, exchanging source code is pretty fast. You don't need to push broken commits on a server but can exchange change sets locally only between your computers easily.
Lorenz gravatar image Lorenz  ( 2011-07-27 23:20:38 -0600 )edit
3

answered 2011-07-27 21:46:40 -0600

Lorenz gravatar image

updated 2011-07-27 21:47:21 -0600

The PR2's two machines share one common home partition over NFS. We do the same for our other robot. To use NFS, a few constraints should be met:

  • Your computers only communicate over Ethernet, not Wifi. Otherwise NFS might get too slow.
  • You have the same operating system on all of the computers (e.g. Ubuntu, same version, all either 64 bit or 32 bit). This is important because the binaries that are compiled on one machine need to be compatible with the binaries on all other machines.
  • Usernames/user ids and groups should be shared on all computers, e.g. via LDAP.

If NFS does work for you, I think the only way is to keep your source code in repositories which I guess is done anyway, and to update and compile the code on each machine separately. As Marti pointed out already, it shouldn't be too hard to write a script that uses ssh to compile everything on each machine.

edit flag offensive delete link more

Comments

For the 8 workstations we use your solution(after login of a user(LDAP) mounting his home directory from a server). But the 3 robots are mobile(ER1, Evolution) and communicate over WLAN. So they have only local users. Rsync is maybe a good alternative.
MichaelKorn gravatar image MichaelKorn  ( 2011-07-28 00:11:42 -0600 )edit

Question Tools

Stats

Asked: 2011-07-27 11:25:26 -0600

Seen: 461 times

Last updated: Jan 19 '12