Ask Your Question

[Solved]Can not launch a remote node from launch file

asked 2017-03-30 08:47:37 -0600

HeZlah gravatar image

updated 2017-04-04 09:31:47 -0600


In .bashrc I had

export ROS_IP=`hostname -I`

which apparently puts a space after the IP. So that caused the IP and port to be split into two.

Hi all,

I am having troubles launching a remote node from a launch file. I have a raspberry pi based mobile robot, which runs a node responsible for setting velocities and publishing encoder odometer (wheel_motor_controller_node).

I would like to start this node from a launch file on my Ubuntu 16.04 machine. The launch file looks like this:


<machine name="rosPi" address="" env-loader="~/ch-bot_ws/devel/" user="pi" />

<param name="ch_bot_model" command="xacro '$(find ch_bot_description)/urdf/ch_bot.xacro'" />

<node machine="rosPi" pkg="ch_bot" name="wheel_motor_controller_node" type="wheel_motor_controller_node" />


However I get a weird error, as if it is trying to pass the ssh port in as a launch file or something:

roslaunch ch_bot_description launch.launch
... logging to /home/hez/.ros/log/e4cd3d32-12ce-11e7-bad8-b827eb948adf/roslaunch-hez-VirtualBox-18713.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.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see
started roslaunch server :39884/
remote[] starting roslaunch
remote[]: creating ssh connection to, user[pi]
/usr/lib/python2.7/dist-packages/Crypto/Cipher/ FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher =, *args, **kwargs)
launching remote roslaunch child with command: [env ROS_MASTER_URI= ~/ch-bot_ws/devel/ roslaunch -c -u :39884/ --run_id e4cd3d32-12ce-11e7-bad8-b827eb948adf]
remote[]: ssh connection created
remote[]: [:39884/] is not a launch file name
The traceback for the exception was written to the log file

[] killing on exit
remote roslaunch failed to launch: rosPi
The traceback for the exception was written to the log file

My looks like this:

#!/usr/bin/env sh
# generated from catkin/cmake/templates/

if [ $# -eq 0 ] ; then
  /bin/echo "Usage: COMMANDS"
  /bin/echo "Calling without arguments is not supported anymore. Inste$
  exit 1

# ensure to not use different shell type which was set before

# source from same directory as this file
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd)
#. ~/ch-bot_ws/devel/
exec "$@"

Note I tried replacing the entire with the commented line before the exec, just to make sure it was running the correct setup.

I think I have done something wrong in the launch file.. But I have no idea what. It seems to look like all of the examples and tutorials I have seen - albeit minimal.

Any help would be greatly ... (more)

edit retag flag offensive close merge delete


which apparently puts a space after the IP

I'm slightly confused, isn't that exactly what I wrote below?

gvdhoorn gravatar image gvdhoorn  ( 2017-04-04 10:33:10 -0600 )edit

Yes, it is exactly what you wrote and you lead me to my solution. Thank you! I solved it at the last minute before I went off on business and wrote the [solved] update to my post on mobile-- It was being a pain and would not let my mark your post as the correct answer. That is fixed now. Thanks!

HeZlah gravatar image HeZlah  ( 2017-04-05 07:36:34 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-30 10:44:22 -0600

gvdhoorn gravatar image
started roslaunch server :39884/

How did you set your ROS_IP? There is most likely a space between the 5 and :39884. As this is then used to form the command passed to SSH, we get

env ROS_MASTER_URI= ~/ch-bot_ws/devel/ roslaunch -c -u :39884/ [..]

notice the space here again. The :39884/ is then interpreted as the launch file positional argument to roslaunch (as it's no longer part of the -u argument).

Also: env-loader="~/ch-bot_ws/devel/": it's recommended to use absolute paths only for env-loader scripts, as ~ would resolve to the home dir of the remote user, which requires you to mirror the exact same folder layout on your remote system. If you use absolute paths, the script could be anywhere.

edit flag offensive delete link more


This is absolutely correct, solution is edited into original post. And yes I would usually use (and am now) absolute paths. That path was just an artifact of my frustrated debugging.

Thanks for your help!

HeZlah gravatar image HeZlah  ( 2017-04-05 07:39:12 -0600 )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: 2017-03-30 08:47:37 -0600

Seen: 643 times

Last updated: Apr 04 '17