Remote ROSlaunch

asked 2022-03-14 04:05:56 -0600

yxtay gravatar image

Hi, I cannot ros launch my program remotely. My intention is to perform a server client action on two different machines, with the remote machine being the master. I have tried to manually ssh the remote machine, start the server node, then run the client locally, and it works fine.

I want to do this process remotely, and have done the following:

  1. Ensure the two machines can communicate with each other.
  2. Setup a RSA ssh key for passwordless login
  3. Setup an environment script in my remote machine under /opt/ros/melodic/


source /opt/ros/melodic/setup.bash
source /home/weston/catkin_ws/devel/setup.bash
exec "$@"
  1. Setup my launch file in my local machine (point 4)

   <machine name="xi" address="" env-loader="/opt/ros/melodic/" user="xi" />
   <node name="lift_server" pkg="peripheral_camera_lift" type="lift_server" output="screen">
      <param name="uart_port" value="/dev/ttyUSB0" />

My local machine has ip and hostname set at, while remote machine has ip and hostname set at

My local machine .bashrc set at

export ROS_IP=

and remote machine .bashrc set at


Also, I noticed I have to run roscore on the remote machine manually, else the ros launch will result in error saying cannot contact host, which is I do not think should be the case. And assuming I run roscore on the remote machine, this is what appears:

$ roslaunch peripheral_camera_lift camera_lift_remote.launch 
... logging to /home/evas/.ros/log/4bbca158-0460-11e8-a707-00044beb0c50/roslaunch-evas-VAPOR-17-PRO-10938.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server


 * /lift_server/uart_port: /dev/ttyUSB0
 * /rosdistro: melodic
 * /rosversion: 1.14.12

    lift_server (peripheral_camera_lift/lift_server)


process[lift_server-1]: started with pid [10962]
Specified uart port of the lift: /dev/ttyUSB0
open: No such file or directory
open: No such file or directory
Failed to initialize lift
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
[lift_server-1] process has died [pid 10962, exit code -6, cmd /home/evas/catkin_ws/devel/lib/peripheral_camera_lift/lift_server __name:=lift_server __log:=/home/evas/.ros/log/4bbca158-0460-11e8-a707-00044beb0c50/lift_server-1.log].
log file: /home/evas/.ros/log/4bbca158-0460-11e8-a707-00044beb0c50/lift_server-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete

It looks like the program did not run remotely. Any help will be appreciated, thanks!

edit retag flag offensive close merge delete