ros2 / message_filters

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

C++ equivalent of `allow_headerless` synchronization #74

Open akgoins opened 2 years ago

akgoins commented 2 years ago

I know that you can set allow_headerless = True in python, but is there an equivalent option for C++? Are there plans to add it in the future?

clalancette commented 2 years ago

It looks like there is nothing equivalent in C++ right now. Certainly we would be happy to review a pull request that added it to the C++ side of things, so please consider contributing.

lix19937 commented 2 months ago

In this example, the Cache stores the last 100 messages received on my_topic, and myCallback is called on the addition of every new message. The user can then make calls like cache.getInterval(start, end) to extract part of the cache.

If the message type does not contain a header field that is normally used to determine its timestamp, and the Cache is contructed with allow_headerless=True, the current ROS time is used as the timestamp of the message. This is currently only available in Python.

@akgoins http://wiki.ros.org/message_filters#ExactTime_Policy