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

launching remote machine

asked 2020-11-18 04:30:31 -0500

dinesh gravatar image

updated 2020-11-19 00:27:07 -0500

My startup_launch.sh on remote machine:

#!/bin/bash
export ROS_IP=<remote-ip>
export ROS_MASTER_URI=http://<local-ip>:11311
source /opt/ros/noetic/setup.bash
source /home/ubuntu/service_robot_ws_old/devel/setup.bash

My medicbot.launch in local pc:

<?xml version="1.0"?>
<launch>
  <machine name="ubuntu" address="<remote-ip>" user="ubuntu" password="airobotics" env-loader="~/scripts/startup_launch.sh" default="true"/>

  <include file="$(find medicbot_control)/launch/medicbot_diff_drive_controller.launch"/>
</launch>

After i launch this launch file from my local pc i'm getting this kind of errors:

Resource not found: medicbot_control
ROS path [0]=/opt/ros/noetic/share/ros
ROS path [1]=/home/ubuntu/turtlebot3_ws/src
ROS path [2]=/opt/ros/noetic/share
The traceback for the exception was written to the log file

Here i can easily ssh loing to my remote machine with ssh ubuntu@<remote-ip> and run the medicbot_control pkgs. But when i try to launch the same file from the local pc i'm getting above errors.

I'm using ros noetic on ubuntu 20.04. I'm connected my raspberry pi 4B (8 gb ram) through ethernet right now and doing all this testing.

Here when i try to run the node instead of launch file also it is showing error:

<?xml version="1.0"?>
<launch>
  <machine name="ubuntu" address="<remote-ip>" user="ubuntu" password="airobotics" env-loader="~/scripts/startup_launch.sh" default="true"/>
  <node machine="ubuntu" pkg="cv_camera" type="cv_camera_node" name="cv_camera_node"/>
</launch>

The error is:

remote[10.42.0.107-0] starting roslaunch
remote[10.42.0.107-0]: creating ssh connection to 10.42.0.107:22, user[ubuntu]
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://localhost:11311 ~/scripts/startup_launch.sh roslaunch -c 10.42.0.107-0 -u http://linux:42821/ --run_id d6360b06-2a2f-11eb-af75-bd8bf4312da5 --sigint-timeout 15.0 --sigterm-timeout 2.0]
remote[10.42.0.107-0]: ssh connection created
[10.42.0.107-0] killing on exit
RLException: remote roslaunch failed to launch: ubuntu
The traceback for the exception was written to the log file

So even the simple cv_camera_node is not working even with machine tag.

edit retag flag offensive close merge delete

Comments

Since you've confirmed that you have the resource, it seems that the issue is with the environment setup. As found in the roslaunch <machine> tag documentation, the environment script generally ends with exec "$@". Does that help?

tryan gravatar image tryan  ( 2020-11-18 05:46:23 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-11-18 06:45:18 -0500

Wolf gravatar image

I think you missed the "machine" attribute in the node tag.

Your may look like (Note machine="ubuntu" was added):

<?xml version="1.0"?>
<launch>
  <machine name="ubuntu" address="<remote-ip>" user="ubuntu" password="airobotics" env-loader="~/scripts/startup_launch.sh" default="true"/>

  <include machine="ubuntu" file="$(find medicbot_control)/launch/medicbot_diff_drive_controller.launch"/>
</launch>

See http://wiki.ros.org/roslaunch/XML/mac...

edit flag offensive delete link more

Comments

Haha, so did I!

tryan gravatar image tryan  ( 2020-11-18 06:48:21 -0500 )edit

Still same error is coming.

dinesh gravatar image dinesh  ( 2020-11-18 09:45:21 -0500 )edit
-1

answered 2020-11-18 11:08:09 -0500

lfvm0001 gravatar image

I've seen the machine attribute when using a node tag, for example:

<node machine="ubuntu" name="map_server" pkg="map_server" type="map_server"args="/map.yaml" />

In you case you have an include tag calling another launch. You need to modify that file (medicbot_diff_drive_controller.launch) and use the machine attribute in each node you are calling in it.

Hope it helps

edit flag offensive delete link more

Comments

i've updated my question.

dinesh gravatar image dinesh  ( 2020-11-19 00:25:22 -0500 )edit

Before the error was about the pkg not being found... now the new error it seems to be related to ssh connection .... Acording to this question: https://answers.ros.org/question/1873... you are missing an " exec "$@" " in your environment loader.

lfvm0001 gravatar image lfvm0001  ( 2020-11-19 03:14:02 -0500 )edit

For example:

#!/bin/sh

. /opt/ros/fuerte/setup.sh
exec "$@"
lfvm0001 gravatar image lfvm0001  ( 2020-11-19 03:15:44 -0500 )edit

Also try to avoid using SSH password (its strongly discouraged) It is highly recommended that you configure SSH keys and SSH agent instead so you can login with certificates instead. Info taken from: http://wiki.ros.org/roslaunch/XML/mac...

lfvm0001 gravatar image lfvm0001  ( 2020-11-19 03:17:47 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2020-11-18 04:30:31 -0500

Seen: 601 times

Last updated: Nov 19 '20