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

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

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

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

<launch>
  <machine name="machine_y" address="192.168.1.130" env-loader="/opt/ros/fuerte/env.sh"/>
  <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 -->
</launch>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

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

l4ncelot gravatar image

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

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 local_bash.sh, remote_bash.sh 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.

local_bash.sh:

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

This will run remote_bash.sh script on your local host.

remote_bash.sh would then look like this:

roslaunch ros_package remote.launch
edit flag offensive delete link more

Comments

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

Ugnius Malukas gravatar image Ugnius Malukas  ( 2017-11-03 06:29:41 -0500 )edit
0

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

gvdhoorn gravatar image

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

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

Question Tools

3 followers

Stats

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

Seen: 506 times

Last updated: Nov 04 '17