After a discussion with @prashanthr05, we realized that sometimes it is important to store data in different channels but with the same timestamp.
In principle, this would be possible by storing structs of data for example, but this is not currently supported. An easy workaround is to store all the data in separated vectors. On the other hand, to make sure that all the data is saved in a synchronized way, it is necessary to specify also the timestamp.
This may also be helpful when storing the data read from the yarp interfaces, saving the timestamp retrieved by the yarp interface, rather than the one obtained by the application.
First I had applied the modifications copying from an old version of the code. Luckily there where some asserts that did not compile, since the lock of the mutex was not there. Fixed that
I then removed an assert on the now function, since it is not necessary in this case.
After a discussion with @prashanthr05, we realized that sometimes it is important to store data in different channels but with the same timestamp.
In principle, this would be possible by storing structs of data for example, but this is not currently supported. An easy workaround is to store all the data in separated vectors. On the other hand, to make sure that all the data is saved in a synchronized way, it is necessary to specify also the timestamp.
This may also be helpful when storing the data read from the yarp interfaces, saving the timestamp retrieved by the
yarp
interface, rather than the one obtained by the application.