Robotics StackExchange | Archived questions

Synchronizing on the same topic

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 :

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.

Asked by Mackou on 2020-09-16 02:25:11 UTC

Comments

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

Asked by Weasfas on 2020-09-17 03:57:55 UTC

@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

Asked by Mackou on 2020-09-17 04:27:59 UTC

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 is to have all together, unless there is a nicer and faster way to cope with this implemented by the manufacturer of the sensor.

Asked by Weasfas on 2020-09-17 04:58:05 UTC

Answers