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

Remotely launch files that are not part of current workspace?

asked 2016-03-31 16:06:30 -0500

sr71 gravatar image

updated 2016-03-31 16:07:04 -0500

I'm aware of the <machine> tag which is used to launch remote nodes. However, this seems to fail when the remote node workspace is different from the local workspace.

Specifically, if I have a package "remote_pkg" in my remote workspace, but not in my local workspace (where I am calling it from), I get the following error:

  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 200, in get_path
    raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: remote_pkg

My launch file is as follows:

<launch>
    <machine name="remote_machine" address="remote_machine.local" user="ubuntu"/>
    <include machine="remote_machine" file="$(find remote_pkg)/launch/main_online.launch"/>
</launch>

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-31 17:31:54 -0500

ahendrix gravatar image

It's a bit of a footnote, but the docs for roslaunch do clearly state:

Substitution args are currently resolved on the local machine. In other words, environment variables and ROS package paths will be set to their values in your current environment, even for remotely launched processes.

This includes the $(find pkg) substitution.

This means that any launch files that you want to launch remotely need to exist on the local machine, and they need to be at the same absolute path on both the local and remote machines.

edit flag offensive delete link more

Comments

I see. For now, I will pass in an absolute path. Thank you.

sr71 gravatar image sr71  ( 2016-03-31 19:30:54 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-31 16:06:30 -0500

Seen: 638 times

Last updated: Mar 31 '16