ros2 / message_filters

BSD 3-Clause "New" or "Revised" License
76 stars 66 forks source link

rates_ vector out of channel order #111

Open andermi opened 10 months ago

andermi commented 10 months ago

rates_ vector out of channel order when user-specified RateConfig vector provided

fixes https://github.com/ros2/message_filters/issues/110

clalancette commented 9 months ago

I'm honestly not sure that this is the correct fix. From what I can tell of the current code, it is actually possible (if non-intuitive) to configure the rates properly. You just need to call setRateConfigPerMessage of the correct size, and then all of the calls to add will reference the correct configuration as they are created. And then sort_indices will actually sort them by their expiry time.

However, I'm not 100% sure of all of that. What I think we really need is an example/test that shows the problem that we are trying to solve, and the way we would solve it with the current code. Then we can consider whether this proposal solves it better.

andermi commented 9 months ago

Sounds good! I can try adding a test to replicate #110