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

roslaunch can not launch node on remote machine

asked 2018-03-26 09:43:29 -0500

krl101 gravatar image

updated 2018-03-27 08:34:42 -0500

Hi community!!

Following setup: one Ubuntu 16.04 PC with ros-kinetic and one Raspberry Pi with Ubuntu Mate and ros-kinetic.

On each machine there is a lauch-file for some nodes, they are configured to work together. As long as i launch them manually everything is fine :)

Problem: Now i merged the two separate launch-file and added the "machine"-tag.... For simplification and debuging, i tried it with the talker and listener from ros-tuorial. My approach looks like this:

<launch>
    <machine name="alice" address="alice.emma.lab" env-loader="/opt/ros/kinetic/env.sh" />
    <machine name="rosPi" address="rosPi.emma.lab"  env-loader="/opt/ros/kinetic/env.sh" />
    <node machine="alice" pkg="dummy" name="talker-alice" type="talker"/>
    <node machine="rosPi" pkg="delault_pkg" name="listener-pi" output="screen" type="listener" /> 
 </launch>

But all i get is:

....
remote[rosPi.emma.lab-0]: ssh connection created
....
MACHINES
* alice
* rosPi
....
process[talker-alice-6]: started with pid [4155]
[rosPi.emma.lab-0]: launching nodes...
[rosPi.emma.lab-0]: ROS_MASTER_URI=http://10.42.0.1:11311/
[rosPi.emma.lab-0]: ERROR: cannot launch node of type [delault_pkg/listener-pi]: delault_pkg
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/opt/ros/kinetic/share
[rosPi.emma.lab-0]: ... done launching nodes

So i checked: http://wiki.ros.org/ROS/NetworkSetup. Result: ssh-login with keys, ping, netcat and name resolution works, ROS_HOSTNAME & ROS_MASTER_URI are correct. On both PCs the firewall is down.

But still no chance with the given launch-file :/ Have i missed anything?? Any config, tag or somesing? I am grateful for any hint!

EDIT and Solution:

With the exact path to env-loader for the remote package:

<machine name="rosPi" address="ros-rasp-mate.emma.lab"  env-loader="/home/labh/plattform-ros/devel/env.sh" />

It works :)

edit retag flag offensive close merge delete

Comments

1

roslaunch xml substitution args (ie: find and friends) are evaluated on the machine where roslaunch is invoked. This means that if default_pkg / your workspace is not in the exact same location as on your desktop, it cannot be started on your Pi.

Can you check?

gvdhoorn gravatar image gvdhoorn  ( 2018-03-26 10:20:52 -0500 )edit

Also: pkg="delault_pkg": is that a typo, or is it really delault (and not default)?

gvdhoorn gravatar image gvdhoorn  ( 2018-03-26 10:21:48 -0500 )edit

Thank you for your answer! Yes, default vs delault is a typo in my Question -.-' Sorry for this! If i understand your comment right, on both machines have to be the default_pkg under the same path? This is not the case. This package is only on the Pi and not at the desktop, should it?

krl101 gravatar image krl101  ( 2018-03-26 12:11:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2018-03-26 11:13:37 -0500

ahendrix gravatar image

You're using the default environment loader, which will only set up the package path for ROS packages that are installed in opt.

You should instead use the environment loader from your remote workspace; there should be an auto-generated environment loader in devel/env.sh within your remote catkin workspace.

edit flag offensive delete link more

Comments

So instead of:

<machine name="rosPi" address="rosPi.emma.lab"  env-loader="/opt/ros/kinetic/env.sh" />

is should be

<machine name="rosPi" address="rosPi.emma.lab"  env-loader="/path/to/workspace/devel/env.sh" />

? Thank you for your answer! I will give it a try asap.

krl101 gravatar image krl101  ( 2018-03-26 12:16:33 -0500 )edit

Yes. The exact path will depend on the path to your workspace.

ahendrix gravatar image ahendrix  ( 2018-03-26 16:01:12 -0500 )edit

Checked!!! Thank you very much!!

krl101 gravatar image krl101  ( 2018-03-27 08:34:12 -0500 )edit

Met the same problem and it is the reason. Upvote.

SJ gravatar image SJ  ( 2018-03-29 17:44:51 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2018-03-26 09:43:29 -0500

Seen: 1,931 times

Last updated: Mar 27 '18