[Solved]Can not launch a remote node from launch file
EDIT: SOLVED
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:
<launch>
<machine name="rosPi" address="192.168.1.32" env-loader="~/ch-bot_ws/devel/env.sh" 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" />
</launch>
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 http://wiki.ros.org/xacro#Processing_Order
started roslaunch server http://192.168.1.5 :39884/
remote[192.168.1.32-0] starting roslaunch
remote[192.168.1.32-0]: creating ssh connection to 192.168.1.32:22, user[pi]
/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.32:11311 ~/ch-bot_ws/devel/env.sh roslaunch -c 192.168.1.32-0 -u http://192.168.1.5 :39884/ --run_id e4cd3d32-12ce-11e7-bad8-b827eb948adf]
remote[192.168.1.32-0]: ssh connection created
remote[192.168.1.32-0]: [:39884/] is not a launch file name
The traceback for the exception was written to the log file
[192.168.1.32-0] killing on exit
remote roslaunch failed to launch: rosPi
The traceback for the exception was written to the log file
My env.sh looks like this:
#!/usr/bin/env sh
# generated from catkin/cmake/templates/env.sh.in
if [ $# -eq 0 ] ; then
/bin/echo "Usage: env.sh COMMANDS"
/bin/echo "Calling env.sh without arguments is not supported anymore. Inste$
exit 1
fi
# ensure to not use different shell type which was set before
CATKIN_SHELL=sh
# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"
#. ~/ch-bot_ws/devel/setup.sh
exec "$@"
Note I tried replacing the entire env.sh 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 ...
I'm slightly confused, isn't that exactly what I wrote below?
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!