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

How to include a .launch file on a remote machine from a .launch file?

asked 2016-02-28 16:56:30 -0500

JKostas gravatar image

I'm trying to write a launch file that automatically ssh's and launches turtlebot_bringup minimal.launch on my turtlebot from my computer. I'm using Indigo. I have something like this:

  <machine name="machname" address="mybot" user="myuser"/>
  <include file="/opt/ros/indigo/share/turtlebot_bringup/launch/minimal.launch" machine="machname"/>

as suggested in this question. However, like the some of the commenters in that question, I'm getting a "unknown <include> attribute 'machine'" error. What's the correct way to do this? Thanks in advance for the help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-02-28 17:19:12 -0500

ahendrix gravatar image

From reading through the source for roslaunch, and from looking at the other posts on that question, I'm pretty sure the undocumented feature you're trying to use was removed in later versions of roslaunch.

Instead, you might want to try using the default atrribute to the maching tag, to make all nodes run on the remote machine:

  <machine name="machname" address="mybot" user="myuser" default="true"/>
  <include file="/opt/ros/indigo/share/turtlebot_bringup/launch/minimal.launch"/>
edit flag offensive delete link more


Thanks!! I had other issues trying to run the XML above, and decided to give up and use a keyboard macro (xdotool's "key" command + python + python's subprocess module). However, while the XML may not work perfectly, this answer is, in general, a great solution to this issue. Thanks again!

JKostas gravatar image JKostas  ( 2016-03-02 00:34:43 -0500 )edit

answered 2019-11-19 12:03:49 -0500

MikeWrock gravatar image

If anyone else comes across this question like me, this may be helpful:

I don't believe you can include files via the file="" tag for launch or configuration files remotely. If they exist locally the nodes within them are launched remotely, however if the launch file only exists on the remote machine it cannot be found.

My solution to this is to either copy the launch file to the local machine, or copy-paste the contents of the remote launch file in to my local launch file.

edit flag offensive delete link more

Question Tools



Asked: 2016-02-28 16:50:56 -0500

Seen: 1,066 times

Last updated: Feb 28 '16