I have decided to change what PUSH and PULL behaviors are represented by. Before a push was either a decrease, or two consecutive decreases. I have changed that representation for an increase or two increases. A PULL has similarly been changed from an increase to a decrease. The change looks to make the definition more intuitive. As when one pushes, the forces should increase. Or when the robot pushes the force should increase.
Added more flexibility in the way we compute the start and end of previous/next/current states. It allows for trials that only have 1, 2, or 3 states; ie incomplete trials
Adjustments related to failureCharacterization. hlbehComposition_new.m requires adjustments in different parts of the code to deal with scenarios where the size of stateData is 1 or 2. loadData.m, now includes an ending time to the stateData vector, if it's size is not the complete length of value 5. GradientClassification has been tuned to factor gradient classification by 10 or 100 only for moments but not for forces.
Updated motComps so that PULL Behaviors are not caused by increases but by decreases. And PUSH behaviors are caused by increases not decreases. I have reversed the meanings as they were originally conceived since they are more intuitive in this way.
Added a Documentation folder.
In the process of refining filtering cycles. For all time duration filtering, we are first checking to make sure that only contiguous signals whose amplitude difference is not greater than 5x are filtered. We don't want to merge primitives that have large difference in amplitude, even if the duration is short. There are three for the framework: 1) Filtering primitives: primiitvesCleanUp.m. For compositions cleanUp.m. For LLBs Refinement.m.
Update primitivesCleanUp.m and MergePrimitives.m as well as cleanUp.m and MergeCompositions.m. I have redesigned the functions so that when tyring to merge repeated primitives or compositions we do not only look at the next element, but we can look as many elements down as necessary. It's much more efficient. When doing this, many of the filtering stages in the Composites layer and in the LLB layer do much less work.
In this commit, we improved the way motion compositions are generated. We included a criteria that checks the amplitude value of pairs of primitives in this layer. If the amplitude of either primitive is greater than some threshold (currently 2), it only uses one primitive to represent the composition; otherwise it uses both. This does not apply if either primitive is a contact.
In this updated we included an additional criteria to merging primitives into composites. That is, a duration criteria (on top of the amplitude criteria). If a contiguous primitive is a threshold (currently 5x) longer than the other primitive, use a single primitive to form the composition. We have also fixed several bugs on MergePrimitive, MergeComposites as well as primitivesCleanUp and cleanUp regarding the way we compute the merged amplitude value and time boundaries. We also decided to only perform cleanUp from the Rotation automata state to the Mating state but not at the Approach state. So, cleanUp reflects this in the starting index of the clean up routines.
Fixed minor bugs
primitiveCleanUp depends on duration and amplitude analysis. Before we used the same parameter for both, we now included a separate amplitudeRatio parameter (size 2x) to see if we merge or not.
Documenting snapVerfication more extensively and adding Bayesian Filtering files to GIT.
FailureCharacterization analysis for deviations in the x-direction was completed here in its first draft. A new folder was created to hold all functions related to failureCharacterization.
Milestone: completed developping the failureCharacterization tests to see if there is deviation in the X-direction. Failure is analyzed first during the approachState and into the Rotation. There is a new folder in the trunk called failureCharac.
Further refining of the Failure Characterization algorithm. Added functionality to distinguish MzRot to include both positive and negative values in two separate parameters. Fixed if/elseif nested statements into if/end if/end sequences of statements to allow all variables to be computed...
Fixed threshold for failure correlation.
Fixed nested if/else in internal correlation.
Fixed indeces related to yDir updating
Fixed MzRotPosAvgMag name for saving
For xRollDir test, created two sets of pairs of variables to hold data for a positive and minus direction: xRollDirPos: FxAppPos,FzAppPos and the minus direction. Corrected snapVerification, loadFCData, updateHistData, failureCharacterization... also changed zeroFill padding to place values = -99 and included processing of number of elements for MCs in failureCharac.