ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

How to synchronize data between 2 different ROS nodes?

asked 2021-04-26 16:27:49 -0600

mch gravatar image

updated 2021-04-26 16:28:22 -0600

Note: Q is not about time/timestamps synchronization. It's only about internal data.

Example: I have a node (A) running on a local machine under ROS. Node has internal data structure stored in memory. Let's say it's just a cpp std::unsorted_map. Now somewhere in the same local network on the other ROS machine I have another node (B). And B also has std::unsorted_map. Now I want 2 maps were always synced between 2 nodes so that they always were the same.

I know I can write a code to do it myself, but I'd like to get a hint for existing lib/framework/package allowing me to do that.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-21 02:10:30 -0600

ljaniec gravatar image

ROS1 package called message-filters is a set of message filters which take in messages and may output those messages at a later time, based on the conditions that filter needs met.

You should check this message filter:

The TimeSynchronizer filter synchronizes incoming channels by the timestamps contained in their headers, and outputs them in the form of a single callback that takes the same number of channels. The C++ implementation can synchronize up to 9 channels.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-04-26 16:27:49 -0600

Seen: 143 times

Last updated: Sep 21 '22