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

I can't execute roslanch of remote PC from host PC

asked 2018-01-27 21:55:27 -0600

sasadasd gravatar image

updated 2018-01-30 05:27:26 -0600

Hello, I'd like to execute simple roslaunch file(test1.launch) of remote PC from host PC.Then I encountered the following error.please let me know how to resolve the problem.

started roslaunch server http://mori:44595/


 * /rosdistro: indigo
 * /rosversion: 1.11.21

    test1 (test1/test1_node)

ERROR: unable to contact ROS master at [http://NotePC:11311]
The traceback for the exception was written to the log file

I configured something as the following procedure.

[1] setting of IP Address and name

on Host(NotePC)
I executed "sudo gedit /etc/hosts" and save the following parameter NotePC mori

on remote PC(mori)
I executed same command. NotePC mori

[2] start roscore I executed the following command to start roscore in host(NotePC)

export ROS_MASTER_URI=http://NotePC:11311 

[3] connect to remotePC

ssh mori@mori -p 22
export ROS_HOSTNAME=mori
export ROS_MASTER_URI=http://NotePC:11311 
roslaunch test1 test1.launch

Then I encountered above error. test1.launch file is following.

 <machine name="mori" address="mori" env-loader="/home/mori/catkin_ws/devel/" user="mori" password="my_pass"/>   
 <node  machine="mori" pkg="test1" type="test1_node" name="test1" output="screen"/>

My "/home/mori/catkin_ws/devel/" is the following.

#!/usr/bin/env sh
# generated from catkin/cmake/templates/

if [ $# -eq 0 ] ; then
/bin/echo "Usage: COMMANDS"
/bin/echo "Calling without arguments is not supported anymore. Instead spawn a subshell and source a   setup file manually."
exit 1

# ensure to not use different shell type which was set before

# source from same directory as this file
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd)
exec "$@"

I checked the following contents.

(1) Ping test:I executed "ping NotePC" in remote PC . Then I succeed.
(2) I executed "echo $ROS_HOSTNAME" after the step [3].
(3) I executed "echo $ROS_MASTER_URI  after the step [3].
(4) I  succeed execution of the command "rosrun test1 test1_node" after step[3].
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-30 06:32:01 -0600

sasadasd gravatar image

updated 2018-01-30 06:33:33 -0600

I found that I should set "ROS_IP" on each PC. After I configured it , I can execute roslaunch from remote PC.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-01-27 21:55:27 -0600

Seen: 494 times

Last updated: Jan 30 '18