How to properly configure system to remotely launch nodes
I'm having trouble launching nodes remotely using launch files and need some help. Even using ssh keys roslaunch
still cannot find the remote computer (despite it stating that it started the ssh
session). I'm running Indigo with Ubuntu 14.04 on both my workstation computer and the computer aboard the robot, I'm not setting any parameters, and I don't have ROS_HOSTNAME
set, only ROS_IP
which is 192.168.1.103
for the workstation (master) and 192.168.1.212
for the robot. These are the steps that have been taken so far:
- Went through the ROS Network Setup Tutorial and made sure that the machines can ping each other and used
netcat
to check that communication over ports is possible. - Create an RSA ssh key to make it possible to ssh into a machine without a password (and checked it).
- Used
ssh -oHostKeyAlgorithms='ssh-rsa' host
when making the first connection as shown in this answer - Followed the example in the
roslaunch
machine
tag wiki. - Tried using the
ROSLAUNCH_SSH_UNKNOWN
environment variable - Tried steps 4 and 5 with a DSA key, but still no luck.
The robot can still be ssh
ed into and can have code run from there and everything works normally (can see data coming in from topics from the robot, etc.) so I don't think that it's a network issue (although it could be). It's just the launching using machine
tags that doesn't work. Here's the test launch file (talker.launch
) that I've been using:
<launch>
<machine name="robot" user="ngcneuro" address="red2" default="true" env-loader="/opt/ros/indigo/env.sh"/>
<node pkg="beginner_tutorials" name="talker" type="talker.py" machine="robot" />
</launch>
My package is called test_machine
and here's what ROS master
is telling me after running:
$ roslaunch test_machine talker.launch
... logging to /home/ngcneuro/.ros/log/7ce15492-50a4-11e7-8d3e-40167e358fbd/roslaunch-NGNeuromorphic1-14982.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://192.168.1.103:59087/
remote[red2-0] starting roslaunch
remote[red2-0]: creating ssh connection to red2:22, user[ngcneuro]
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
self._cipher = factory.new(key, *args, **kwargs)
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://192.168.1.103:11311 /opt/ros/indigo/env.sh roslaunch -c red2-0 -u http://192.168.1.103:59087/ --run_id 7ce15492-50a4-11e7-8d3e-40167e358fbd]
remote[red2-0]: ssh connection created
SUMMARY
========
PARAMETERS
* /rosdistro: indigo
* /rosversion: 1.11.21
MACHINES
* robot
NODES
/
talker (beginner_tutorials/talker.py)
ROS_MASTER_URI=http://192.168.1.103:11311
core service [/rosout] found
^C[red2-0] killing on exit
^Cerror launching on [red2-0, uri http://robot:39508/]: Interrupted system call
Launch of the following nodes most likely failed: beginner_tutorials/talker.py
^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C ...