Ask Your Question
1

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

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

sasadasd gravatar image

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

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/

SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.21

NODES
  /
    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
    192.168.122.22 NotePC
    192.168.122.33 mori

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

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

export ROS_MASTER_URI=http://NotePC:11311 
roscore

[3] connect to remotePC

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

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

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

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

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

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

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

# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"
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].
        >mori
(3) I executed "echo $ROS_MASTER_URI  after the step [3].
       >http://NotePC:11311
(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
1

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

sasadasd gravatar image

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 241 times

Last updated: Jan 30 '18