0
$\begingroup$

Rosanswers logo

Hi,

I've recently bought a Raspberry Pi 4. And I really want to use it to control my own robots. But for most applications I would like to have my Ubuntu virtual machine serve as a GUI for my robot. Therefore I need to have a working ROS network between my VM and my RasPi. All the instructions on the ROS Networking tutorial have been followed and I can ping and netcat between both machines. Since I don't have access to the tutorial's listener and talker on my RasPi I figured I could just use some basic rostopic commands to try out my setup. But when I attempt to echo a topic, this topic remains silent.

On my master device I have ran

roscore

and

rostopic pub -r 1 /plop std_msgs/String -- 'Hello slave'

both in separate terminals, of course.

On the slave side the master URI has been set :

export ROS_MASTER_URI=http://192.168.0.100:11311

And I can see the /plop topic :

bgi@ubuntu-VB:~$ rostopic list
/plop
/rosout
/rosout_agg

But when trying to listen to it, there's no message :

rostopic echo /plop

Bot my virtual machine and my Raspberry Pi are running ROS melodic and they can ping and netcat each other. Has anybody an idea of what is going on here, why can I see a topic but not listen to it?


Originally posted by BGI on ROS Answers with karma: 11 on 2020-12-06

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In ROS1, on client hosts (of a host where ROS Master runs on), setting ROS_MASTER_URI is required but not sufficient. Review "Name resolution" section in http://wiki.ros.org/ROS/NetworkSetup. I'd say ROS_HOSTNAME and/or ROS_IP are minimum requirement.


Originally posted by 130s with karma: 10937 on 2020-12-06

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by BGI on 2020-12-06:
Thank you for your quick reply. That actually worked. I added both on both sides and now it runs properly.

Comment by BGI on 2020-12-06:
If anybody else runs into this issue it was just a matter of adding ROS_IP on the master side.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.