diff --git a/objectDetectionTypes.hpp b/objectDetectionTypes.hpp index d7bae9fc..52b837d5 100644 --- a/objectDetectionTypes.hpp +++ b/objectDetectionTypes.hpp @@ -7,6 +7,7 @@ #include // TODO 1 #include + namespace mars { @@ -68,4 +69,30 @@ namespace mars }; } + +// need to tell the stream_aligner/transformer that the timestamp of these types +// is hidden in "header.stamp", instead of the default "time" member variable +namespace aggregator { + inline base::Time determineTimestamp(const mars::Detection3DArray& sample) + { + return sample.header.stamp; + } + + inline base::Time determineTimestamp(const mars::Detection3D& sample) + { + return sample.header.stamp; + } + + inline base::Time determineTimestamp(const mars::PointCloud& sample) + { + return sample.header.stamp; + } + + inline base::Time determineTimestamp(const mars::Header& sample) + { + return sample.stamp; + } +} + + #endif