Files not found when launching from remote PC
When trying to use a launchfile to launch ROS nodes on two seperate machines, the remote PC cannot find the files I want to launch. I have also installed both packages on both machines for testing purpouses. The files is can be launched on both PC's, but when I try to launch them remotely, they're not found.
I have looked at a lot of other people using ROS on two machines, but I cannot seem to find any solution to this problem. Any suggestions/help is appreciated. All necessary files is listed below.
EDIT: I have tried launching the turtlesim teleop node on the remote PC, a node that is native in ROS. This works with no problem, so the problem lies in custom made nodes.
EDIT: Added the "printenv" variables from manually
Main launch file
<launch>
<include file="$(find r18dv_tf_publisher)/hosts/hosts.machine" />
<node machine="tegra_a" pkg="r18dv_tf_publisher" type="tf_broadcaster" name="tf_broadcaster" />
<node machine="tegra_b" pkg="r18dv_simple_heading_controller" type="r18dv_simple_heading_controller_node" name="heading_controller" output="screen" />
</launch>
hosts.machine
<launch>
<machine name="tegra_a" address="10.42.0.28" env-loader="/opt/ros/kinetic/env.sh" />
<machine name="tegra_b" address="10.42.0.29" env-loader="/opt/ros/kinetic/env.sh" />
</launch>
The file structure is identical on the two machines, and both env.sh files is located at the same location.
env.sh on tegra_a
#!/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. Instead spawn a subshell and source a setup file manually."
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"
export ROS_WS=/home/nvidia/catkin_ws
export ROS_KINETIC=/etc/ros/kinetic
source $ROS_WS/devel/setup.bash
source $ROS_KINETIC/setup.bash
export PATH=$ROS_ROOT/bin:$PATH
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$ROS_WS
export ROS_MASTER_URI=http://10.42.0.28:11311/
export ROS_HOSTNAME=10.42.0.28
exec "$@"
env.sh on tegra_b
#!/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. Instead spawn a subshell and source a setup file manually."
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"
export ROS_WS=/home/nvidia/catkin_ws
export ROS_KINETIC=/etc/ros/kinetic
source $ROS_WS/devel/setup.bash
source $ROS_KINETIC/setup.bash
export PATH=$ROS_ROOT/bin:$PATH
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:$ROS_WS
export ROS_MASTER_URI=http://10.42.0.28:11311/
export ROS_HOSTNAME=10.42.0.29
exec "$@"
Output when launching the launchfile
nvidia@nvidia:/opt/ros/kinetic$ roslaunch r18dv_tf_publisher test_launch.launch
... logging to /home/nvidia/.ros/log/3dfcc3a4-fba0-11e7-8f39-00044b8da45f/roslaunch-nvidia-8089.log
Checking log directory for disk usage. This may ...