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

Cannot remotely launch nodes

asked 2020-09-03 06:12:44 -0500

max43234 gravatar image

updated 2020-09-04 04:35:35 -0500

gvdhoorn gravatar image

Hey, I am fairly new to working with ROS and actually in general. What I want to do is remotely launch turtlebot3_robot.launch from the turtlebot3_bringup package. If I run roscore on my REMOTE PC and then I run rosrun turtlebot3_bringup turtlebot3_diagnostics on the RASPBERRY PI (via SSH in command line), everything works fine.

Now I have written a launch file that "bringup_allrobots.launch" which is located on the REMOTE PC and which looks like that:

<launch>
  <group >
    <machine name="raspi_on_robot_00" user="raspi01" address="192.168.0.102" password="" env-loader="/home/raspi01/catkin_ws/devel/env.sh" default="true" />
    <node pkg="turtlebot3_bringup" type="turtlebot3_diagnostics" name="turtlebot3_diagnostics" output="screen"/>
  </group>
</launch>

However, when I try running this launch file from my REMOTE PC I get the following error:

error launching on [192.168.0.102-0, uri http://raspi01-desktop:35531/]: Name or service not known
Launch of the following nodes most likely failed:  turtlebot3_bringup/turtlebot3_diagnostics

You can find the entire log screen below.

If anybody has an idea how to fix this, it would be really appreciated!

Thanks in advance.

REMOTE PC

PC: Lenovo Thinkpad T480s
OS: Ubuntu 18.04
ROS: melodic
Environment variables:
ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://192.168.0.100:11311/
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROS_IP=192.168.0.100
ROS_PACKAGE_PATH=/home/max/catkin_ws/:/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=melodic

RASPBBERRRY PI

SBC: Raspberry 3B+
OS: Ubuntu Mate
ROS: melodic
Environment variables:
ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://192.168.0.100:11311/
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROS_IP=192.168.0.102
ROS_PACKAGE_PATH=/home/raspi01/catkin_ws/src:/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=/home/raspi01/catkin_ws/devel/share/common-lisp
ROS_DISTRO=melodic


... logging to /home/max/.ros/log/bc01685e-edc4-11ea-a177-b46bfc2e39de/roslaunch-max-ThinkPad-T480s-8159.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 http://192.168.0.100:37581/
remote[192.168.0.102-0] starting roslaunch
remote[192.168.0.102-0]: creating ssh connection to 192.168.0.102:22, user[raspi01]
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://192.168.0.100:11311/ /home/raspi01/catkin_ws/devel/env.sh roslaunch -c 192.168.0.102-0 -u http://192.168.0.100:37581/ --run_id bc01685e-edc4-11ea-a177-b46bfc2e39de]
remote[192.168.0.102-0]: ssh connection created

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.9

MACHINES
 * raspi_on_robot_00

NODES
  /
    turtlebot3_diagnostics (turtlebot3_bringup/turtlebot3_diagnostics)

auto-starting new master
process[master]: started with pid [8174]
ROS_MASTER_URI=http://192.168.0.100:11311/

setting /run_id to bc01685e-edc4-11ea-a177-b46bfc2e39de
process[rosout-1]: started with pid [8186]
started core service [/rosout]
error launching on [192.168.0.102-0, uri http://raspi01-desktop:41515/]: Name or service not known
Launch of the following nodes most likely failed: turtlebot3_bringup/turtlebot3_diagnostics
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-09-04 04:24:29 -0500

MrRivi gravatar image

Hi, just to clarify, you want the ros master to be located at your PC and then tell the master to start the turtlebot3_bringup node at your Raspberry, right? Is it a requisite for your project? If you change the ROS_MASTER_URI you can start it on the Raspberry Pi without having to do the remote launch.

Also, is turtlebot3_bringup installed/built on the Raspberry? From my point of view, the first time you do rosrun turtlebot3_bringup turtlebot3_diagnostics, it doesn't start the process on your Raspberry but on your PC since the ROS_MASTER_URI in the Raspberry aims at your PC. But with your launch file (bringup_allrobots.launch) aiming at the Raspberry, maybe the package needs to be reinstalled there or the variable ROS_PACKAGE_PATH changed to aim to your PC.

Hope this helps :)

edit flag offensive delete link more

Comments

Hey, thanks for your reply! Yes, I need to run the ros master on my pc because I just want to use one master for multiple robots.

I think I have kind of figured out the reason for this issue. As can be seen in the console output in the post, the name that is used to run the node turtlebot3_diagnostics is raspi01-desktop which is the localhost on the RASPBERRY PI. However, I would actually want the raspberry to identify itself within the network under the name raspy_on_robot_00.

If I add 192.168.0.102 raspi01-desktop to the /etc/hosts file on my REMOTE PC, everything seems to work fine - no errors and the turtlebot3_diagnostics node runs on the raspberry pi. However, now I have two names for one IP adress in that file, which does not seem okay to me either.

I'll keep investigating and post an update ...(more)

max43234 gravatar image max43234  ( 2020-09-04 07:04:04 -0500 )edit

What about using raspi01-desktop@192.168.0.102 ?

MrRivi gravatar image MrRivi  ( 2020-09-04 14:01:13 -0500 )edit

That is actually what I am doing now and it works. Thanks a lot and sorry for the late reply!

max43234 gravatar image max43234  ( 2020-09-18 03:34:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-09-03 04:17:07 -0500

Seen: 206 times

Last updated: Sep 04 '20