Commit 846a4091 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[README] add more helper methods examples

parent c67c0abc
......@@ -215,7 +215,7 @@ ContactPhase cp0;
**Helper methods**
**Helper methods to create contact sequence**
Several helper methods have been added to the ContactSequence class to ease the contact creation process:
......@@ -231,6 +231,34 @@ Several helper methods have been added to the ContactSequence class to ease the
**Helper methods to check a contact sequence**
The ContactSequence class contains several methods to check if the sequence contains some of the optional data, and if they are consistents across all the contact phases.
This methods should be used in order to check if a ContactSequence object given as input to your algorithm have been correctly initialized with all the data that you are going to use in your algorithm.
It may also be used to check if your algorithm output consistent data.
Examples of such methods are `haveConsistentContacts` or `haveCentroidalTrajectories` which check that the (c, dc, ddc, L, dL) have been initialized, have the correct duration,
and that each trajectories of one phase correctly end at the same value as it begin in the next phase.
**Helper methods to access Data**
The ContactSequence class also contains methods for easier access to the data contained in the ContactPhase vector. For example, `phaseAtTime` or `phaseIdAtTime` can be used to access a specific ContactPhase at a given time.
`getAllEffectorsInContact` output all the effector used to create contact during the sequence.
Finally, methods exists to return the complete trajectory along the contact sequence, concatenating the trajectories of each phases (eg. `concatenateCtrajectories` return the complete c(t) trajectory for all the contact sequence).
## Examples
[Examples](examples/ provide several serialized ContactSequence files with descriptions.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment