Cannot run ROS across different machines
Hi everyone,
I'm having trouble running ROS across multiple machines. I have my ROS Master running on a robot (based on the NVIDIA Jetson Nano) and I'm trying to visualize some data on my laptop via Rviz but with no success.
I did the usual set up of environment variables on the Nano (where 192.168.1.109
is the Nano's ip):
export ROS_MASTER_URI=http://192.168.1.109:11311
export ROS_IP=192.168.1.109
roscore
as well as the following on my laptop (192.168.1.110
is my computer's ip):
export ROS_MASTER_URI=http://192.168.1.109:11311
export ROS_IP=192.168.1.110
But whenever I try to run some node on my laptop (tried it with rviz
and several simpler nodes), it will just hang for a while until it raises the following error:
[ERROR] [1618945845.530120204]: [registerPublisher] Failed to contact master at [192.168.1.109:11311].
Retrying...
The weird thing is that I can easily ssh into the Nano, but for some reason my ROS on my laptop won't connect to the master on the Nano. Please excuse me if I'm missing something really obvious here, it's been a while since I last used ROS, but I do recall that setting up a communication across different machines was not difficult at all.
I'm not sure if it helps but I'm running ROS Melodic on the Nano (Ubuntu 18.04) and ROS Noetic on my laptop (Ubuntu 20.04).
Thank you all!
-disregard- To my knowledge, cross-distribution compatibility is not possible. I believe to run ROS across different machines, each machine would need to be running the same ROS version. In your case, that would be Melodic on both machines or Noetic on both machines.
@shonigmann It is definitely possible to mix different versions of ROS. For example, I've run Hydro, Indigo, Kinetic, and Jade all at the same time interacting with each other. Now, there may be some issues with messages (I can't remember exactly all of the issues as this was 3+ years ago), but this totally doable (mixing different versions of ROS).
@pfontana96 Have you gone through this tutorial?
I stand corrected then! glad you chimed in. helps build my own understanding. I figured as API/ABI compatibility isn't enforced between releases, that cross-release interaction would be tricky. But interesting that it is/was possible.
the comment by @jayess is specifically about compatibility between nodes using ROS messages, services and/or actions.
The middleware acts as an abstraction layer there, which nicely hides any API/ABI problems, as messages are sufficiently standardised (both syntax and semantics).
thanks for the clarification