Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request info on BufferManager usage #145

Closed
GiulioRomualdi opened this issue Dec 10, 2021 · 2 comments · Fixed by #146
Closed

Request info on BufferManager usage #145

GiulioRomualdi opened this issue Dec 10, 2021 · 2 comments · Fixed by #146

Comments

@GiulioRomualdi
Copy link
Member

GiulioRomualdi commented Dec 10, 2021

Hi all, I am trying to use yarp telemetry library in https://github.com/ami-iit/bipedal-locomotion-framework/tree/master/devices/YarpRobotLoggerDevice and I have two questions:

  1. As far as I understood the yarp::telemetry::experimental::BufferManager is the main class that is used to save the data in a mat file. I noticed that the user should specify a type for a given BufferManager. Now let's assume I want to store in the same mat files both int vector and double vectors is it possible?
  2. we are used to store the data by grouping them into "types". For instance, all the FTs belong to the same Matlab structure called FTs and then each element of the structure is a vector containing the 6 elements of the wrench over time.
    See here. Is it possible to replicate this with yarp-telemetry? For instance, it is possible to have multiple BufferManagers in the same mat file? If this would be possible I can create a BufferManager for each "type" of data (e.g. one for FTs, one for JointState, one for the high-level info (CoM ZMP, ...))
    I am afraid that this is not possible since according to the documentation there seems that for each BufferManager there exists one Matlab file.

cc @traversaro @Nicogene @S-Dafarra

@GiulioRomualdi
Copy link
Member Author

GiulioRomualdi commented Dec 10, 2021

I'm afraid that the answers of both the questions are no

Since the BufferManager contains a map of BufferInfo of the same type

https://github.com/robotology/yarp-telemetry/blob/8a5cffe81ea65c44dd2b84c176674a8bf1466b58/src/libYARP_telemetry/src/yarp/telemetry/experimental/BufferManager.h#L473

and the BufferManager is the one that handles the flush in the file

@Nicogene
Copy link
Member

Hi @GiulioRomualdi!

You answered by yourself 😄

As you mentioned, at this moment each BufferManager is associated with a single .mat file and it handles only one type.

The first point is a known limitation (see #76) that can be addressed with some template black magic or some modern construct like std::any.
The second point you posted could be handled by the "deamon/collector", we discussed about the need to have something that collect all the data and merge it in one mat file and one place (#51)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants