Ask Your Question
0

Running ROS across multiple machines is failed

asked 2018-01-04 19:24:44 -0600

Bharathraj gravatar image

updated 2018-01-04 21:10:30 -0600

jayess gravatar image

Hi All,

I am trying to run ROS across 2 machines, master is starting with out any issues when I tried to run listener getting below errors.

root@test:/opt/ros/indigo# rosrun rospy_tutorials listener.py
[rospack] Error: package ‘rospy_tutorials’ not found
find: ‘’: No such file or directory

I have followed below procedures.

System 1-

setting static IP-

ifconfig eth0 192.168.0.1 netmask 255.255.255.0
route add default gw 192.168.0.1 dev eth0

export ROS_IP=192.168.0.1
export ROS_HOSTNAME=192.168.0.1

roscore &

export ROS_MASTER_URI=http://192.168.0.1:11311/
rosrun rospy_tutorials listener.py

System-2

setting static IP-

ifconfig eth0 192.168.0.2 netmask 255.255.255.0
route add default gw 192.168.0.2 dev eth0

export ROS_IP=192.168.0.2
export ROS_HOSTNAME=192.168.0.2

export ROS_MASTER_URI=http://192.168.0.1:11311/
rosrun rospy_tutorials talker.py

Note: I could able to ping between system 1 & 2.

Kindly help us to debug this issue in my setup.

Kindly let me know if you need any more information,

Regards

edit retag flag offensive close merge delete

Comments

Welcome! What's the issue here? The error message or a network problem? Being able to ping isn't sufficient. You need to make sure that you can communicate over all ports.

jayess gravatar imagejayess ( 2018-01-04 21:17:26 -0600 )edit

Also, ROS_HOSTNAME is for host names, not IP addresses. For an IP address use ROS_IP . http://wiki.ros.org/ROS/EnvironmentVa...

jayess gravatar imagejayess ( 2018-01-04 21:19:33 -0600 )edit

export ROS_HOSTNAME=localhost $ export ROS_MASTER_URI=http://localhost:11311

roslaunch rospy_tutorials talker_listener.launch

with the above steps, it works fine ..

As you pointed out Looks like it's a network/setup issue. Since I am new to ROS finding difficult to figure it out

Bharathraj gravatar imageBharathraj ( 2018-01-05 17:12:54 -0600 )edit

after adding this to env setup it's resolved now

export ROS_PACKAGE_PATH=/home/hjt/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

Thanks for ur support,

Bharathraj gravatar imageBharathraj ( 2018-01-05 17:40:57 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-01-05 02:45:54 -0600

gvdhoorn gravatar image

I doubt this is a problem that is caused by "multiple machines" being involved.

The error is:

[rospack] Error: package ‘rospy_tutorials’ not found
find: ‘’: No such file or directory

That error seems to indicate that the package rospy_tutorials is either not installed on the machine, or is not part of the workspace that is currently sourced.

Can you make sure that:

  1. the rospy_tutorials package is installed on the machine called test?
  2. the root user has sourced the appropriate setup files (note: running as root is generally not recommended)?
edit flag offensive delete link more

Comments

export ROS_HOSTNAME=localhost

export ROS_MASTER_URI=http://localhost:11311

roslaunch rospy_tutorials talker_listener.launch

with the above steps, it works fine & that means rospy_tutorials is installed on the machines.

I am suspecting it could be related to env setup.

Bharathraj gravatar imageBharathraj ( 2018-01-05 17:15:33 -0600 )edit

after adding this to env setup it's resolved now

export ROS_PACKAGE_PATH=/home/hjt/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks

Thanks for ur support,

Bharathraj gravatar imageBharathraj ( 2018-01-05 17:41:12 -0600 )edit

I would recommend you source /home/hjt/catkin_ws/devel/setup.bash instead of manually setting the ROS_PACKAGE_PATH. Setting that variable manually should almost never be necessary.

Also: please consider not running nodes as root, it's rarely necessary.

gvdhoorn gravatar imagegvdhoorn ( 2018-01-06 05:41:20 -0600 )edit

According to your comment it was essentially option 2 then in my answer that was the cause.

gvdhoorn gravatar imagegvdhoorn ( 2018-01-06 05:41:44 -0600 )edit

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-04 19:18:01 -0600

Seen: 182 times

Last updated: Jan 05 '18