@@ -45,7 +45,7 @@ This package define 3 main classes representing physical concepts of legged loco
### Contact Patch
A contact patch define the placement (in SE(3), in the world frame) of a contact as long as the friction coefficient for this contact.
A contact patch define the placement (in SE(3), in the world frame) of a contact as long as the friction coefficient for this contact.
Future work will also include the type of contact (eg planar, punctual, bilateral ...), a representation of the friction cone or additional information about the contact.
...
...
@@ -53,7 +53,7 @@ Future work will also include the type of contact (eg planar, punctual, bilatera
A contact phase is defined by a constant set of contact points.
In the context of bipedal walking, two examples of contact phases are the single and double support phases.
A contact phase store several data, many of which are optional.
A contact phase store several data, many of which are optional.
It store the set of active contacts as a map<String,ContactPatch> with the effector name as Keys:
...
...
@@ -65,17 +65,17 @@ patchRF = ContactPatch(p,0.5) # create a new contact patch at the placement p wi
cp.addContact("right-feet",patchRF)
# check if an effector is in contact:
cp.isEffectorInContact("right-feet")
# access to the contact patch from the effector name:
# access to the contact patch from the effector name:
cp.contactPatch("right-feet")
```
```
A contact phase can be defined in a specific time interval:
A contact phase can be defined in a specific time interval:
```python
cp=ContactPhase()
cp.timeInitial=1.
cp.timeFinal=3.5
```
```
**Centroidal dynamic data**
...
...
@@ -102,9 +102,9 @@ Optionnaly, a Contact Phase can store data related to the centroidal dynamic. It
point3_tm_L_final;
/// \brief Final angular momentum derivative for this contact phase
point3_tm_dL_final;
```
```
It also store centroidal trajectories, represented with objects from the [Curves](https://github.com/loco-3d/curves) library:
It also store centroidal trajectories, represented with objects from the [NDCurves](https://github.com/loco-3d/ndcurves) library:
```c
...
...
@@ -124,18 +124,18 @@ It also store centroidal trajectories, represented with objects from the [Curves
curve_ptrm_zmp;
/// \brief SE3 trajectory of the root of the robot
curve_SE3_ptrm_root;
```
```
**Wholebody data:**
A Contact Phase can also store data related to the wholebody motion, it store the following initial and final wholebody configuration as public member:
A Contact Phase can also store data related to the wholebody motion, it store the following initial and final wholebody configuration as public member:
```c
/// \brief Initial whole body configuration of this phase
pointX_tm_q_init;
/// \brief Final whole body configuration of this phase
pointX_tm_q_final;
```
```
And the following trajectories:
...
...
@@ -148,7 +148,7 @@ And the following trajectories:
curve_ptrm_ddq;
/// \brief trajectory for the joint torques
curve_ptrm_tau;
```
```
It can also store the contact forces and contact normal forces, in a map<String,curve_ptr> with the effector name as Key:
...
...
@@ -156,14 +156,14 @@ It can also store the contact forces and contact normal forces, in a map<String,
@@ -228,38 +228,28 @@ Several helper methods have been added to the ContactSequence class to ease the
* it create the contact with eeName at the given placement.
*`moveEffectorOf(eeName, transform, durationBreak, durationCreate)` Similar to moveEffectorToPlacement but use a transform from the previous contact placement instead of a new placement.
*`moveEffectorOf(eeName, transform, durationBreak, durationCreate)` Similar to moveEffectorToPlacement but use a transform from the previous contact placement instead of a new placement.
**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.
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.
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.
`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/README.md) provide several serialized ContactSequence files with descriptions.
[Examples](examples/README.md) provide several serialized ContactSequence files with descriptions.