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

Revision history [back]

click to hide/show revision 1
initial version

I solved the issue. The problem was, that the bashrc is not called by shh commands. I wrote my own env-loader and put all the config stuff in it. I put it to the workspace on the slave and changed the launch file on master.

This is the env-loader on slave:

#!/usr/bin/bash

source /opt/ros/melodic/setup.bash
source /home/pi/bob_ws/install/setup.bash
export ROS_MASTER_URI=http://192.168.1.99:11311
export ROS_IP=192.168.1.37
export ROS_HOSTNAME=$ROS_IP
export PATH="/opt/ros/melodic/share:$PATH"
export ROS_PACKAGE_PATH=/home/pi/bob_ws/install/share:$ROS_PACKAGE_PATH

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
exec "$@"

This is the part in launch file on master:

<machine name="raspberrypi" address="192.168.1.37" env-loader="/home/pi/bob_ws/src/adc_mcc172/scripts/env.sh" user="pi" password="***"/>
<node machine="raspberrypi" pkg="adc_mcc172" name="adc_mcc172" type="adc_mcc172_node.py"/>