ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Remote Roslaunch - Resource Not Found

asked 2022-04-14 13:11:21 -0500

Mattisha gravatar image

updated 2022-04-20 08:53:48 -0500

ljaniec gravatar image

Hi all! I am running ROS Melodic on two machines that are on the same network (host X and remote computer Y). I attempting to run a launch file on host X, which launches packages from X and remote computer Y. However, I always seem to get this error, no matter what I try:

Done checking log file disk usage. Usage is <1GB.

Resource not found: Y_package
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/XUser/base_ws/src
ROS path [2]=/opt/ros/melodic/share
The traceback for the exception was written to the log file

I am able to rosrun a talker on X and a listener on Y, and have them communicate, as well as a listener on Y and a talker on X - I can ping X from Y and Y from X. I know that they can communicate.

Below is my launch file code:

<launch>
        <arg name="port"        default="/dev/ttyACM0" />
        <arg name="config"      default="defaultConfig.yaml" />


        <machine name="X" address="192.168.8.104" user="XUser" env-loader="/opt/ros/melodic/env.sh" password="XPassword" />
                <node machine="X" pkg="X_package" type="cpp1" name="cpp1" required="true" output="screen" />
                <node machine="X" pkg="X_package" type="cpp2" name="cpp2" required="true" output="screen" />
                <node machine="X" pkg="X_package" type="py1.py" name="py" required="true" output="screen"  />

        <machine name="Y" address="192.168.8.200" user="YUser" env-loader="/opt/ros/melodic/env.sh" password="YPassword" />
                <node machine="Y" pkg="joy" type="joy_node" name="joy_node" required="true" output="screen"/>
                <node machine="Y" pkg="rosserial_arduino" type="serial_node.py" name="serial_node" args="$(arg port)" required="true" output="screen" />
                <node machine="Y" pkg="Y_package" type="py2.py" name="py2" required="true" output="screen" />
                <node machine="Y" pkg="Y_package" type="py3.py" name="py3" required="true" output="screen" />
                <node machine="Y" pkg="Y_Package" type="py4.py" name="py4" required="true" output="screen" />

</launch>

I can run all these files in a launch file locally on Y just fine with roscore running on X. It's just when trying to run a launch file on X with Y_package in it that I get the above error.

I already know about the ROS Multiple Machines, the ROS NetworkSetup and the roslaunch XML tutorials, and have applied them where needed, but they were still not enough.

Please let me know what else you might need to help me, I'm at my wits end! Thank you!

Edit: Forgot to mention that everything is sourced correctly as well - at least I'm pretty sure.

This is my /opt/ros/melodic/env.sh on machine X:

#!/usr/bin/env sh
# generated from catkin/cmake/templates/env.sh.in
source /home/XUser/base_ws/devel/setup.bash

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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-04-20 08:27:37 -0500

Mattisha gravatar image

Hi all!

I used this tutorial and it made everything work out - the only change I had was making the custom env file export the local machine (machine X) for the ROS_MASTER_URI so everything ran on the local machine instead the remote one.

Hope this helps!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-04-14 13:11:21 -0500

Seen: 501 times

Last updated: Apr 20 '22