You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This stream produces samples with no metadata (SampleInfo) using the take_bare method internally instead of take.
Is there a way to access the SampleInfo using the async interface, or do I need to resort to synchronously calling take on the reader directly?
Is there a reason that the async interface currently strips the metadata? Performance I'm guessing?
It seems like a more versatile interface would expose the metadata and let the user choose to ignore it.
Or perhaps two interfaces could exist, one that provides metadata and one that doesn't?
The text was updated successfully, but these errors were encountered:
This stream produces samples with no metadata (SampleInfo) using the take_bare method internally instead of take.
Is there a way to access the SampleInfo using the async interface, or do I need to resort to synchronously calling take on the reader directly?
No. You need to use the synchronous API.
Is there a reason that the async interface currently strips the metadata? Performance I'm guessing?
Performance and lazy development. You are the first one to come up with a use case of async + metadata.
Our main use case is ROS 2, and that does not use the metadata at all.
Performancewise, a full DataReader (as opposed to SimpleDataReader) needs to maintain a DataSampleCache to generate the various metadata items, and that requires some memory + CPU, even if no-one ever uses the metadata.
It seems like a more versatile interface would expose the metadata and let the user choose to ignore it.
Or perhaps two interfaces could exist, one that provides metadata and one that doesn't?
The correct solution here would be to provide an alternative interface. If you want to try to implement that, then that should be reasonably straightforward. I would start from making a copy of the current async machinery for the DataReader and just replacing its SimpleDataReader with a full version, and using .take() instead of .take_bare() and seeing how far that would get me. Please make a PR if you choose to try.
Using the async interface, as in the examples:
This stream produces samples with no metadata (
SampleInfo
) using thetake_bare
method internally instead oftake
.Is there a way to access the
SampleInfo
using the async interface, or do I need to resort to synchronously callingtake
on the reader directly?Is there a reason that the async interface currently strips the metadata? Performance I'm guessing?
It seems like a more versatile interface would expose the metadata and let the user choose to ignore it.
Or perhaps two interfaces could exist, one that provides metadata and one that doesn't?
The text was updated successfully, but these errors were encountered: