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

Fix Xsens Calibrator device #21

Merged
merged 1 commit into from
Feb 8, 2019

Conversation

lrapetti
Copy link
Member

@lrapetti lrapetti commented Feb 7, 2019

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 to true by xsens callbacks onCalibrationAborted , onCalibrationComplete , and onCalibrationProcessed . However it seems none of those callbacks is called after m_suitsConnector.clearCalibration() (or at least not in a reasonable time).

So, the m_operationCompleted flag is replaced by m_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

@lrapetti lrapetti reopened this Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants