Time Sequencer: on multiple input message types

asked 2021-09-15 05:16:48 -0500

bkocev gravatar image

Hi everyone,

I am wondering if I can use the time sequencer on multiple input types, i.e., e.g., IMU messages, GPS messages, DVL messages, in order to time-based align my input data that I provide as input to our (Unscented) Kalman filter?

I know that the TimeSequencer filter guarantees that messages will be called in temporal order according to their header's timestamp. The TimeSequencer is constructed with a specific delay which specifies how long to queue up messages before passing them through.

However, based on what it is written here http://wiki.ros.org/message_filters#T... and all the examples on the Web, I fear that it is not possible to have multiple input message types as in the case with the Time Synchronizer. On the other hand the Time Synchronizer does not seem appropriate, because of the not suitable policies and the fact that the callback is not called unless there are messages received on all data channels at the exact/approximate time point. In our case, it could very well be that sometimes some of the channels, e.g., DVL or GPS, are not available during certain periods, which means the other data will never be delivered.

Any idea on how to time-based align our sensor data would be very much appreciated.

Thank you!

edit retag flag offensive close merge delete

Comments

Any reason you don't subscribe to the topics individually, cache the results and trigger the update callback with a timer?

moooeeeep gravatar image moooeeeep  ( 2021-09-16 06:26:24 -0500 )edit

Hi, thanks for the reply. Certainly implementing that functionality myself is an option, but I would prefer an already available tested library that can also be reused by other people as well. For example, there is a solution for that in Rock (see https://www.rock-robotics.org/documen... and https://github.com/rock-core/drivers-...). Hence, I am looking for something similar in ROS. Apparently, the closest to that are the Time Sequencer and the Time Synchronizer, but the problem that I want to solve is not well addressed by both of them.

bkocev gravatar image bkocev  ( 2021-09-16 07:51:47 -0500 )edit

Obviously I can't point you towards something that provides exactly that functionality out of the box. Maybe you can find some inspiration in the implementation of the robot_localization pkg (here). They store a history to factor in delayed inputs and consume all the measurements in order through a priority queue...

moooeeeep gravatar image moooeeeep  ( 2021-09-16 08:11:27 -0500 )edit

Thanks for pointing me to that reference. This again is in the direction of implementing this functionality by myself, e.g., following/according to RosFilter<t>::enqueueMeasurement and RosFilter<t>::integrateMeasurements. I think this is possible, i.e., one way, but I thought there is a solution for this in ROS similar to the existing solution in Rock that everyone can use. I will wait a bit more and then see how to proceed.

bkocev gravatar image bkocev  ( 2021-09-17 06:43:28 -0500 )edit