Ask Your Question

How to include remote machine "y.launch" and run it from local "x.launch"?

asked 2017-11-02 08:03:10 -0600

Cannot launch remote machine "launch" file from local machine. Is there a way to accomplish that?

  <machine name="machine_y" address="" env-loader="/opt/ros/fuerte/"/>
  <include file="/path/to/remote/y.launch" machine="machine_y"/> <!-- doesn't work -->
  <node pkg="package_y" name="package_y_name" machine="machine_y"/> <!-- works -->
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-11-02 09:11:24 -0600

l4ncelot gravatar image

updated 2017-11-02 09:12:07 -0600

I don't know if it's somehow possible using only launch files but it should be possible with bash scripts and ssh. Assuming we have, scripts with local.launch and remote.launch launch files. To run local.launch on local and at the same time remote.launch on remote machine I would do something like this.

roslaunch ros_package local.launch
ssh user@hostname 'bash -s' <

This will run script on your local host. would then look like this:

roslaunch ros_package remote.launch
edit flag offensive delete link more


I thought that there is a way by using only launches. Thanks, though.

Ugnius Malukas gravatar imageUgnius Malukas ( 2017-11-03 06:29:41 -0600 )edit

answered 2017-11-04 06:37:48 -0600

gvdhoorn gravatar image

updated 2017-11-04 06:38:25 -0600

Cannot launch remote machine "launch" file from local machine.

Even though roslaunch can be used to start launch files on remote machines, resolving resources (ie: paths, packages, etc) is always done on the local machine.

The consequence of this is that your local machine must have the same workspace layout as your remote machine(s) (or at least: for the things that you are trying to start remotely), or roslaunch will not be able to find the launch file that you are trying to include (as it doesn't exist on your local machine).

See #q257152 and #q230688 for related questions and answers.

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



Asked: 2017-11-02 08:03:10 -0600

Seen: 202 times

Last updated: Nov 04 '17