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

Can ROS kinetic and Melodic be mixed on the same network?

asked 2019-02-13 15:34:41 -0500

chrisalbertson gravatar image

I have several computers, one is running Ubuntu 16.04 and Kinetic and another one 18.04 and Melodic. I'd like to run ROS core on the Kinetic system and have some nodes running on the Melodic system. Does this work?

Yes, I know and and just try it and see but that is a poor test as I'd only learn about the exact setups I tried, I'm looking for a more general answer

edit retag flag offensive close merge delete

Comments

1

What sort of general answer are you looking for? At the highest level, the same packages may not even be released for both ROS versions, so in that sense they're incompatible.

ahendrix gravatar image ahendrix  ( 2019-02-13 16:00:43 -0500 )edit
1

@chrisalbertson: this exact topic has been discussed on this site many times, and seeing as you write:

Yes, I know and and just try it [..]

I have a feeling that you already saw those discussions.

If something still wasn't clear, can you please update your question with what specifically you're still unsure about? "some nodes" is rather vague.

To summarise all previous discussions: yes, it can work, provided that the message, service and action definitions that are used on the topics, services and actions haven't changed between two ROS versions.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-14 01:24:53 -0500 )edit

I have a mobile robot with limited size/power so I place some of the ROS nodes on workstation class machines and connect with WiFi. Question is if ROS version need to be kept in sync. Testing shows it works, but is this a fluke or is backwards compatibility a ROS design goal?

chrisalbertson gravatar image chrisalbertson  ( 2019-02-14 14:10:49 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-02-15 04:09:22 -0500

gvdhoorn gravatar image

updated 2019-02-23 01:37:52 -0500

I have a mobile robot with limited size/power so I place some of the ROS nodes on workstation class machines and connect with WiFi. Question is if ROS version need to be kept in sync. Testing shows it works, [..]

tl;dr: I believe this should be addressed by the previous Q&As I referred to earlier, but to make it specific to your situation: no, you don't necessarily need to use the same ROS version on all involved hosts. As long as the messages you exchange haven't changed, things should work.

However: there are some things to watch out for that go beyond syntax compatibility (ie: data format).


Longer: ROS nodes make use of messages to communicate (services and actions are also msgs) and the most basic guarantee all participants must have for that to work is that they all use the same message structures (that is: the syntax should be what they expect, otherwise they won't be able to decode incoming data).

As long as the structure of messages hasn't changed (and that includes both names and types of fields) communicating with nodes "from" different ROS versions should work, or at least not result in (de)serialisation errors. ROS (1) will actually stop you from even getting that far, as a hash sum (over all fields and types) is used as a simple check to see whether there are any syntax/structure discrepancies between subscriber and publisher, and if there are the well known error "Client wants topic X to have Y, but our version has Z. Dropping connection" will be printed and nothing will be communicated.

The corollary here is that if there is no such incompatibility, a connection is established and msgs are published and subscribed.

is this a fluke or is backwards compatibility a ROS design goal?

I hope this is now clear from the previous part of my answer: as long as the messages used have the same structure, communication can take place. Many messages in the standard sets of messages (std_msgs, geometry_msgs, trajectory_msgs, etc, etc) haven't seen any changes for a couple of ROS versions already. Chances are high that a network with ROS Indigo, Kinetic and Melodic would be able to exchange messages just fine.

It all depends on whether message (or service, or action) definitions have changed.

I'm not sure we can conclude that the bw-compatibility we achieve with this was a deliberate design goal or is a fortunate side effect of the basic publisher-subscriber compatibility check that is performed, but I would certainly not call it a "fluke" (perhaps @tfoote or @William can say something about that, I wasn't there when all of this was designed/implemented).


Finally: I explicitly emphasised message structure here, as there is one characteristic of message based communication that is not captured by hash sums over message fields and that is semantics (or meaning).

It could be that the way a certain field should be interpreted (ie: the ... (more)

edit flag offensive delete link more

Question Tools

Stats

Asked: 2019-02-13 15:34:41 -0500

Seen: 8,410 times

Last updated: Feb 23 '19