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

launch only remotely installed package on remote machine

asked 2017-06-27 10:24:24 -0600

sihe gravatar image

updated 2017-06-27 10:35:57 -0600

Hello,

I have the following setup:

  • a computer where the roscore runs
  • a remote computer, where a certain node named zed_ros_wrapper ( the node to read out images of the ZED stereo camera) should run

I would like to launch the whole system with a launch file on the computer where the roscore runs.

When I try to launch the zed_ros_wrapper node remotely, i get the following error:

Traceback (most recent call last):
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 307, in main
p.start()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
self._start_infrastructure()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
self._load_config()
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
loader.load(f, config, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 746, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 718, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 662, in _recurse_load
self._param_tag(tag, context, ros_config, verbose=verbose)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
return f(*args, **kwds)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 256, in _param_tag
vals = self.opt_attrs(tag, context, ('value', 'textfile', 'binfile', 'command'))
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 202, in opt_attrs
return [self.resolve_args(tag_value(tag,a), context) for a in attrs]
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 370, in resolve_args
resolved = _resolve_args(resolved, context, resolve_anon, commands)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 383, in _resolve_args
resolved = commands[command](resolved, a, args, context)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 151, in _find
source_path_to_packages=source_path_to_packages)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 197, in _find_executable
full_path = _get_executable_path(rp.get_path(args[0]), path)
File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 203, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: zed_wrapper
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/ubuntu/git_catkin_ws/src
ROS path [2]=/home/ubuntu/catkin_ws/src/image_pipeline/camera_calibration

[... the entire ROS_PACKAGE_PATH ... ]

ROS path [37]=/opt/ros/kinetic/share
ROS path [38]=/home/ubuntu/git_catkin_ws/src/ORB_SLAM2/Examples/ROS

Something to mention is maybe that the zed_wrapper_node is installed on the remote machine, but not on the machine running ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-06-27 10:31:48 -0600

sihe gravatar image

updated 2017-06-27 10:35:41 -0600

I discovered, that apparently the package zed_ros_wrapper needs to be detectable also on the host machine in order to be launched on the remote machine. I don't know why this is, but as soon as I compiled a dummy package also called zed_ros_wrapper on the host machine, the error would disappear and the node would launch without problems on the remote machine.

So as a general rule, to be launched on a remote computer, packages need also to be installed (or at least a package of the same name should be detectable) on the host computer from which the node is remotely launched. Does anybody know of a hint in the ROS documentation about this?

edit flag offensive delete link more

Comments

This hack doesn't seem to work anymore... unfortunately...

Rufus gravatar image Rufus  ( 2021-02-10 02:10:51 -0600 )edit

See my workaround here

Rufus gravatar image Rufus  ( 2021-02-10 03:14:26 -0600 )edit
0

answered 2017-06-27 11:45:48 -0600

gvdhoorn gravatar image

updated 2017-06-27 11:46:10 -0600

Your error is currently 'by design' and expected - albeit perhaps not very nice.

See wiki/roslaunch/XML:

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

edit flag offensive delete link more

Comments

What I then don't understand is how using on the two computers different catkin_ws names causes no problems. On my host machine it's called "git_catkin_ws", and on the remote machine it's called "catkin_ws". Shouldn't this cause problems when the ROS pkg path is set to the current envirnm.?

sihe gravatar image sihe  ( 2017-06-28 07:53:36 -0600 )edit

I can't say why you're not running into any errors.

gvdhoorn gravatar image gvdhoorn  ( 2017-06-28 10:20:58 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2017-06-27 10:24:24 -0600

Seen: 590 times

Last updated: Jun 27 '17