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

remote launch differences

asked 2022-07-28 15:51:45 -0500

thebyohazard gravatar image

updated 2022-08-12 11:09:30 -0500

When a launch file is launched on a remote machine, is anything different about that remote process? The tag allows you to set the user, so I would assume the groups and permissions are the same on the remote machine? But this does not match my experience. Does anything make the launch different than launching directly on the machine?


  • I have an executable to operate some hardware that was given by the manufacturer. They did not provide a library.
  • Since they did not provide a library, I am only able to execute the program on the command line or through system calls in my code. I have a node that executes the system call.
  • If I run the node or execute the command line program on Machine A as user x, everything works fine. If I run the node or execute the command line program on Machine B as user x, everything works fine.
  • However, if I remote launch the node on machine B from machine A, the program will not work on machine B. Both the user on machine A launching the launch file is user x and the user attribute in the machine tag is user x.

The program output is unhelpful.

launch file:

    <machine  name="machineB" address="machineB" default="true" env-loader="/home/x/ros_ws/devel/" user="x"/>

    <node name="mynode" pkg="mynode" type="mynode" respawn="true"/>    
</launch> on machineB:

#!/usr/bin/env bash

source /home/x/ros_ws/devel/setup.bash
export ROSCONSOLE_FORMAT='${time}[${severity}] ${node}/${logger}: ${message}'
export ROS_IP=
export ROS_MASTER_URI=http://machineA:11311
export ROS_NAMESPACE=machineB

exec "$@"
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-08-12 11:11:08 -0500

thebyohazard gravatar image

One thing that is different is that the process has no associated tty.

I noticed that when I ran my launch file in a script as a service through systemd, the program stopped working as well. Looking at the output of ps aux, I saw that the service has no tty. For some reason the manufacturer's program I am trying to use requires an associated tty in order to work properly.

Based on the top answer to this question, encapsulating my system call with

script --return --quiet -c "[mfg command that needs a tty]" /dev/null

makes it happy and everything works fine.

edit flag offensive delete link more

Question Tools



Asked: 2022-07-28 15:51:45 -0500

Seen: 65 times

Last updated: Aug 12 '22