Added
- A new submodule for ZUPT-Detection Algorithms and a first implementation in form of the `NormZuptDetector`.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/167)
- New sub module in preprocessing for sensor alignment functions
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/161)
- New algorithm `PcaAlignment` for sensor heading alignment using 2D PCA to align sensor frame to medio-lateral plane
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/161)
- New position method `PieceWiseLinearDedriftedIntegration` using piece wise linear dedrifted integration utilizing zupt
updates.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/166)
- A new algorithm (`ForwardDirectionSignAlignment`) to detect the walking direction to automatically align the sensor
attachment orientation.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/171)
- An example that explains how to automatically align a sensor to the gaitmap coordinate system, when it was attached in
an arbitrary orientation.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/171)
- The `HerzerEventDetection` - Algorithm, specifically designed to work with stair gait.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/158)
Changed
- Cloning is now more robust and falls back to deep cloning objects that are not algorithms.
This prevents issues when mutable objects (other than nested algorithms) are used in parameters
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/170)
- We now handle mutable defaults to prevent strange edge cases! Read more about it in the `project_structure` guide
under the development-guide tab in the Documentation.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/168)
- The constrained DTW only tracks a single counter now.
By using the positive and the negative value range, we can save 1/3 of the overall RAM.
This should improve performance.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/155)
- `RtsKalman.find_zupts` now gets passed the entire data **before** any unit conversions.
Before it only got the gyro data already converted in rad/s.
This change should make it easier to overwrite the ZUPT detection with custom methods.
This is a breaking change! See the migration guide for more details.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/159)
- The Zupt-Detection of `RtsKalman` is now handled via dependency injection.
Instead of specifying a list of parameters for the Zupt detection you can simply pass a instance of a Zupt detector.
(see `gaitmap.zupt_detection`).
The old parameters a deprecated.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/169)
- The `memory` option for `RtsKalman` was removed.
This is a breaking change!
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/159)
Deprecated
- The parameters `"zupt_threshold_dps", "zupt_window_length_s", "zupt_window_overlap_s"` for `RtsKalman` are now
deprecated.
Instead, a Zupt-Detector instance should be used.
When converting from the current parameters to the new `NormZuptDetector` class, note that the overlap is now
specified as a fraction of the window length and not in seconds!
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/159)
Removed
- The `memory` option for `RtsKalman` was removed.
This is a breaking change!
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/159)
Fixed
- Bugfix for `gaitmap.gait_detection.ullrich_gait_sequence_detection`: Now proper handling of cases where margin
should be added but no gait sequences were detected
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/157)
Migration Guide
- We removed the orientation update feature of the `RtsKalman` class.
This feature was off by default.
Unless you explicitly enabled it, you should be fine.
In case you used the feature, remove all references to the respective keywords.
- The call signature and the units of the gyro data passed `RtsKalman.find_zupts` has changed.
In case you where using custom subclasses of `RtsKalman` to implement custom zupt methods, you need to update your
zupt methods for the new input structure.
However, due to the new changes to ZuptDetectors, it is likely that you do not need a custom subclass anymore, but can
simply pass a instance of a ZuptDetector to the Kalman class
- The `memory` option for `RtsKalman` was removed, as it was not particularly useful. In case you need caching we
recommend implementing it externally.
Scientific Changes
- The "ori_update" feature of the Kalman filter was removed again.
The feature was experimental anyway, but in turns out the implementation was actually wrong.
The RTSKalman filter tracks the change in error state open-loop.
This means errors are not applied during ZUPT-measurements, but simply added up and corrected at the very end.
This works well for position and velocity, but the equations for orientation assume, that the orientation error
remains small enough so that a linearization and separation of the angle error on the different axis is possible.
When the filter is run open loop, it is very likely that the orientation error will quickly reach ranges, where this
doesn't hold anymore.
We concluded that the used method to track the orientation error (and hence, correct it directly) is not suitable for
open-loop Kalmanfilter designs.
It is unlikely that the feature will be added again in the future.
However, prior versions can be used as reference to implement a closed loop Kalmanfilter with direct observations of
the orientation error.
This is a breaking change!
See the Migration section for more details, if you used this feature before.
(https://mad-srv.informatik.uni-erlangen.de/MadLab/GaitAnalysis/gaitmap/-/merge_requests/159)