-
Notifications
You must be signed in to change notification settings - Fork 38
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
Logged data corrupted when adding vectors as exogenous signal #846
Comments
I tried to replicate the issue on my machine but unfortunately the data are correctly logged |
The first message is thrown from here: https://github.com/ami-iit/matio-cpp/blob/1d4008094d7362ae5d0b1c84443f3769d5011e91/src/Variable.cpp#L18-L23 The second message is thrown from https://github.com/ami-iit/matio-cpp/blob/1d4008094d7362ae5d0b1c84443f3769d5011e91/src/Struct.cpp#L53-L57 but I would say at this point it is already late because here the variables have already been created. Another thing I can exclude is that this error is not thrown from the automatic conversion from a C++ struct. This is because the struct is filled by adding fields one by one (see here) that is using a different piece of code. At this point I guess that the problem might occur when creating the output structure in Are you able to open the corrupted file in Matlab? |
I just realized that there is a flaw in this piece of code https://github.com/ami-iit/matio-cpp/blob/1d4008094d7362ae5d0b1c84443f3769d5011e91/src/Struct.cpp#L53-L58 When creating the In fact, in the "corrupted" file, there is data, but not all the data At the moment, it is not clear yet what is the faulty signal, but we can patch the pipeline in two places:
|
Relevant PR ami-iit/matio-cpp#80 |
Hi @S-Dafarra! Really thank you for deepering in the problem! I was wondering if the problem is in the camera signal in the mat file |
Done in robotology/robometry#189 @carloscp3009 @GiulioRomualdi if you could test them, I will proceed with the merge process |
I noticed that |
I wonder whether in a "good" dataset the entries on the main level are the same of #846 (comment) |
The Jabra Camera was disable for the last recording if I remember well. On the other hand, the realsense data present in the mat file is just the timestamp of each consecutive frame, so I would say it's accurate. |
This is how it should look like The main suspect is that the "orientations" field appeared with a null name. |
Looking at the The buffer manager saves the matfile while its destructor is called however as explained in https://stackoverflow.com/questions/2254263/order-of-member-constructor-and-destructor-calls the members are guaranteed to be initialized by order of declaration and destroyed in reverse order. This may create issues while saving the file A possibility is to store the buffermanager in a unique_ptr and manually handle the destruction |
After several attempts, we understood the problem was related to the connection of an exogenous signal vector. We had two main problem:
|
I will open the PR with the modification discussed in #846 (comment) Still, I think we need to add a test perhaps using the new gazebo (cc @xela-95) to intercept this earlier. |
Cc @nicktrem |
I renamed the issue to make it clearer. Currently, the logger is broken when a vector signal is logged as exogenous. No problems for vectors collection |
#849 should fix the issue |
We realized that some data are corrupted and the joints values are not there after closing the logger
When closing the device we got the following errors
cc @S-Dafarra
The text was updated successfully, but these errors were encountered: