Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I found out what seems to be the problem with the
XsensMVNCalibrator
device when trying to discard the old calibration and recalibrate.After discarding the old calibration there is a while loop waiting for discard operation to be completed (see https://github.com/robotology-playground/wearables/blob/feature/cleanup/XSensMVN/src/XSensMVNCalibrator.cpp#L171).
The termination of the waiting loop is determined by
m_operationCompleted
flag which is set totrue
by xsens callbacksonCalibrationAborted
,onCalibrationComplete
, andonCalibrationProcessed
. However it seems none of those callbacks is called afterm_suitsConnector.clearCalibration()
(or at least not in a reasonable time).So, the
m_operationCompleted
flag is replaced bym_suitsConnector.isCalibrationPerformed(calibrationType)
that checks whether the calibration is empty.Moreover the 5-to-0 counter at
https://github.com/robotology-playground/wearables/blob/master/XSensMVN/src/XSensMVNCalibrator.cpp#L273 seems to be completely unuseful since it is done once the calibration is already performed (the subject has to hold the position in the previous while loop) and nothing is going on at that point. I am then removing it