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

Multi-Machine with cpp

asked 2020-08-20 11:55:51 -0500

VictorBarth gravatar image

I've done the multi-machine tutorial, and it works. I'm using my desktop as master and my raspberry as slave. The problem is: with the talker.py and listener.py it works nice, but with talker and listener from c++ tutorials it no works. I receive the message: [ERROR] [1597939815.196358501]: [registerPublisher] Failed to contact master at [barth@192.168.15.10:11311]. Retrying...

So its not a problem of ROS_IP or ROS_Hostname. I have no idea of what can be. Any hints?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-08-20 18:07:25 -0500

praskot gravatar image

Explicitly tell the raspberry pi where the master is located at,

In Raspberry pi add the following line to ~/.bashrc,

export ROS_MASTER_URI=http://192.168.15.10:11311

and in the master ensure you do,

export ROS_IP=192.168.15.10

(I usually set IP as the hostname, i.e., export ROS_HOSTNAME=192.168.15.10.)

Finally, make sure you both the master desktop and raspberry pi are on the same network and you are able to ping master from the raspberry pi.

edit flag offensive delete link more

Comments

Thanks, the problem is that I was doing:

export ROS_MASTER_URI=http://barth@192.168.15.10:11311

instead of

export ROS_MASTER_URI=http://192.168.15.10:11311

VictorBarth gravatar image VictorBarth  ( 2020-08-21 15:25:25 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-08-20 11:55:51 -0500

Seen: 111 times

Last updated: Aug 20 '20