roslaunch node on slave from master
Hey there, I'm using ROS Noetic on my Ubuntu 20 host pc and ROS Melodic on my raspberrypi slave machine. I try to start a node on slave via roslaunch running on master. Roscore is running on master. If I run roslaunch directly on the slave it, works fine. When I do roslaunch on master I get errors.
This is the launch file on master:
<launch>
<machine name="raspberrypi" address="192.168.1.37" env-loader="/opt/ros/melodic/env.sh" user="pi" password="***"/>
<node machine="raspberrypi" pkg="adc_mcc172" name="adc_mcc172" type="adc_mcc172_node.py"/>
</launch>
This is the launch file on slave:
<launch>
<node pkg="adc_mcc172" type="adc_mcc172_node.py" name="adc_mcc172" output="screen" respawn="true" respawn_delay="30" >
some params for device config
</node>
</launch>
This is bashrc on master:
export ROS_MASTER_URI=http://192.168.1.99:11311
export ROS_IP=192.168.1.99
This is bashrc on slave:
export ROS_MASTER_URI=http://192.168.1.99:11311
export ROS_IP=192.168.1.37
export ROS_HOSTNAME=$ROS_IP
I hope that someone has THE idea for this problem. I have no more ideas.
Thanks a lot
Basti
# # #
I get the following output on master when I do roslaunch on master:
started roslaunch server http://192.168.1.99:41385/
remote[192.168.1.37-0] starting roslaunch
remote[192.168.1.37-0]: creating ssh connection to 192.168.1.37:22, user[pi]
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://192.168.1.99:11311
/opt/ros/melodic/env.sh roslaunch -c 192.168.1.37-0 -u http://192.168.1.99:41385/ --run_id 48a903fc-fc55-11ec-84a9-c517f1bf5fd1 --sigint-timeout 15.0 --sigterm-timeout 2.0]
remote[192.168.1.37-0]: ssh connection created
SUMMARY
========
PARAMETERS
* /rosdistro: noetic
* /rosversion: 1.15.14
MACHINES
* raspberrypi
NODES
/
adc_mcc172 (adc_mcc172/adc_mcc172_node.py)
ROS_MASTER_URI=http://192.168.1.99:11311
[192.168.1.37-0]: launching nodes...
[192.168.1.37-0]: ROS_MASTER_URI=http://192.168.1.99:11311
[192.168.1.37-0]: ERROR: cannot launch node of type [adc_mcc172/adc_mcc172_node.py]: adc_mcc172
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share
[192.168.1.37-0]: ... done launching nodes
The error comes from slave machine. I can find it in the ~/.ros/log/ folders.
This is the log-file from slave:
[roslaunch][INFO] 2022-07-06 11:59:14,826: roslaunch starting with args ['/opt/ros/melodic/bin/roslaunch', '-c', '192.168.1.37-0', '-u', 'http://192.168.1.99:41385/', '--run_id', '48a903fc-fc55-11ec-84a9-c517f1bf5fd1', '--sigint-timeout', '15.0', '--sigterm-timeout', '2.0']
[roslaunch][INFO] 2022-07-06 11:59:14,827: roslaunch env is {'ROS_DISTRO': 'melodic', 'XDG_SESSION_TYPE': 'tty', 'SSH_CLIENT': '192.168.1.99 44942 22', 'LOGNAME': 'pi', 'USER': 'pi', 'HOME': '/home/pi', 'PATH': '/opt/ros/melodic/bin:/usr/local/bin:/usr/bin:/bin:/usr/games', 'CMAKE_PREFIX_PATH': '/opt/ros/melodic', 'LD_LIBRARY_PATH': '/opt/ros/melodic/lib', 'LANG': 'en_GB.UTF-8', 'SHELL': '/bin/bash', 'SHLVL': '0', 'ROS_LOG_FILENAME': '/home/pi/.ros/log/48a903fc-fc55-11ec-84a9-c517f1bf5fd1/roslaunch-raspberrypi-14959.log', 'ROS_MASTER_URI': 'http://192.168.1.99:11311', 'XDG_SESSION_CLASS': 'user', 'XDG_RUNTIME_DIR': '/run/user/1000', 'PYTHONPATH': '/opt/ros/melodic/lib/python2 ...
Is
adc_mcc172
installed on your RPi? If it isn't: that's the problem.If it is: is it available as part of the main installation (ie: in
/opt/ros/...
) or in a workspace built from source?If the latter: that's likely why it isn't working.
You've specced
/opt/ros/melodic/env.sh
as yourenv-loader
. That file will only let you use packages located in/opt/ros/melodic/...
(as is confirmed by the error message: it only lists two paths under/opt/ros
as part of theROS path
).Anything in a custom workspace will not be 'visible'.
Ahaaa, yes adc_mcc172 is a node written by me and built via catkin simple in workspace. Do you think, that it woul solve the issue, when I put the path to ros path variable?