Ask Your Question
0

Cannot run ROS across different machines

asked 2021-04-20 14:35:24 -0500

pfontana96 gravatar image

updated 2021-04-24 02:57:22 -0500

miura gravatar image

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!

edit retag flag offensive close merge delete

Comments

-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 gravatar image shonigmann  ( 2021-04-20 18:51:09 -0500 )edit
1

@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).

jayess gravatar image jayess  ( 2021-04-20 18:58:24 -0500 )edit
1

@pfontana96 Have you gone through this tutorial?

jayess gravatar image jayess  ( 2021-04-20 19:00:07 -0500 )edit

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.

shonigmann gravatar image shonigmann  ( 2021-04-20 19:01:47 -0500 )edit
2

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).

gvdhoorn gravatar image gvdhoorn  ( 2021-04-21 04:42:14 -0500 )edit

thanks for the clarification

shonigmann gravatar image shonigmann  ( 2021-04-21 10:40:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-04-21 04:43:58 -0500

gvdhoorn gravatar image

@pfontana96: you write:

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).

is your laptop running Ubuntu natively, or is it a VM?

If natively: is there perhaps a firewall active?

edit flag offensive delete link more

Comments

Thank you @jayess, I had not gone thorugh that tutorial before, but the netcat let me realise that @gvdhoorn was right and the nano had indeed a firewall active!! After disabling it, it worked fine. Thank you a lot!

pfontana96 gravatar image pfontana96  ( 2021-04-21 09:35:53 -0500 )edit

Hi @pfontana96 I am facing the same problem with a rpi4b (connected via ssh). Could you let me know what are the netcat commands to determine that a firewall is active and how to deactivate it?

androadi gravatar image androadi  ( 2021-12-10 02:21:16 -0500 )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: 2021-04-20 14:35:24 -0500

Seen: 296 times

Last updated: Apr 20 '21