bluenviron / goroslib

ROS client library for the Go programming language
MIT License
321 stars 59 forks source link

Timeout subscribing to ROS Topics created on Master Node - No issue on topics created with goroslib. #198

Closed ausbaxter closed 6 months ago

ausbaxter commented 6 months ago

Which operating system are you using?

OS

Architecture

Describe the issue

I have a raspberry pi 4 running ubuntu 20.04 and ROS noetic. I'm using goroslib on a Macbook running OSX Ventura in order to receive messages of type std_msgs.Float32. There is no ROS installed on the Mac.

When creating ROS topics on the pi using rostopic or rospy in python scripts, the following error message is shown on the subscriber created in goroslib on Mac:

[2024/03/14 11:02:10] [ERROR] subscriber '/test_topic' got an error: Post "http://rpi4-dev:45421/RPC2": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

I've confirmed that a publisher and subscriber created with goroslib can communicate without issues, but topics created on the master node appear to fail as the connection times out.

The firewall is disabled on both the raspberry pi and Mac. I can see the subscriber is registered on the ROS master node on the raspberry pi with rosnode list

Any assistance would be greatly appreciated!

ausbaxter commented 6 months ago

Not a bug, had a configuration issue on the master node. When communicating across multiple systems XML-RPC calls need to resolve to the correct address. This is done by setting ROS_IP or ROS_HOSTNAME as well as ROS_MASTER_URI correctly. More information here

github-actions[bot] commented 1 day ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.