Ask Your Question

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:

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

But all i get is:

remote[rosPi.emma.lab-0]: ssh connection created
* alice
* rosPi
process[talker-alice-6]: started with pid [4155]
[rosPi.emma.lab-0]: launching nodes...
[rosPi.emma.lab-0]: ROS_MASTER_URI=
[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: 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/" />

It works :)

edit retag flag offensive close merge delete



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

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/ within your remote catkin workspace.

edit flag offensive delete link more


So instead of:

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

is should be

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

? 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



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

Seen: 1,316 times

Last updated: Mar 27 '18