Synchronizing on the same topic

asked 2020-09-16 02:25:11 -0500

Mackou gravatar image

updated 2020-09-17 04:28:56 -0500

Hello everyone !

I have a problem and I cannot figure out how to solve it alone so I ask you for help !

My radar can track up to 64 objects and will publish data about those objects. The problem is that it's not sending an array but it's sending one message per track on one topic ! In this case the Time Synchronizer cannot help me and the timestamps are not the same so IIn this case the Time Synchronizer cannot help me and the timestamps are not the same cannot do it manually ...

What is the solution to this problem ?

thanks a lot !

[Edit] Added more details :

I will try to explain it better :

At each scan my radar outputs :

  • An array of 64 objects in a specific topic (1 scan = 1 message)
  • 1 message per object for the tracking details on another topic (1 scan = 64 messages)

If both topics would be arrays and I would have same amount of messages to sync it would be perfect, i could use the Time Synchronizer but here ? With different amount of messages ? I dont know.

edit retag flag offensive close merge delete


@Mackou, How it is possible that the same set of detections does not containt almost the same or approximate timestamps? If you want to synchronize message from different topics with slighlty different times in the header you can use the Approximate time policy of message_filter.

Weasfas gravatar image Weasfas  ( 2020-09-17 03:57:55 -0500 )edit

@Weasfas Thanks for your answer ! They do have approximately the same timestamp, but it's not the problem here.

I edited my message with more details

Mackou gravatar image Mackou  ( 2020-09-17 04:27:59 -0500 )edit

I see, with that amount of topics maybe message_filters is not a suitable approach. You will need to map somehow your 64 object array to each topic in question. The posible solution I find is:

  1. Separate in several nodes and process parts of the information by chucks. For instance with a message filter 8 by 8 until 64 (8 nodes).
  2. Do it manually subscribing to the topic array and the 64 other topics. Then mapping each array position with each topic name only when the header time is approximate or the same.

I had never needed to cope with this kind of set ups so I cannot be of much more help than this. However I think that this set up is not coherent at the very basics; why you have that relation of having a separate list of scans and then the infromation is single topics? The coherent thing ...(more)

Weasfas gravatar image Weasfas  ( 2020-09-17 04:58:05 -0500 )edit