Commit 105b42b0 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[README] update readme with examples and helpers

parent 3e1c9852
......@@ -217,4 +217,20 @@ cs.append(cp0);
**Helper methods**
_TODO_ Several helper methods will be added to easy the contact sequence creation process.
Several helper methods have been added to the ContactSequence class to ease the contact creation process:
* `breakContact(eeName, phaseDuration)` Add a new contactPhase at the end of the current ContactSequence, the new ContactPhase have the same ContactPatchs as the last phase of the sequence, with the exeption of the given contact removed.
* `createContact(eeName, contactPatch, phaseDuration)` Add a new contactPhase at the end of the current ContactSequence, the new ContactPhase have the same ContactPatchs as the last phase of the sequence, with the exeption of the given contact added.
* `moveEffectorToPlacement(eeName, placement, durationBreak, durationCreate)` Add two new phases at the end of the current ContactSequence:
- it break the contact with eeName
- 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.
This folder contains several serialized ContactSequence objects for different scenarios. They are all made for the Talos humanoid robot, and a simple environment with a flat floor at z=0.
All this file have been generated with the [multicontact-locomotion-planning](https://github.com/loco-3d/multicontact-locomotion-planning) framework.
## Loading the files:
### C++
```c
#include "multicontact-api/scenario/contact-sequence.hpp"
ContactSequence cs;
cs.loadFromBinary(filename);
```
### Python
```python
from multicontact_api import ContactSequence
cs = ContactSequence()
cs.loadFromBinary(filename)
```
## Prefix notation
For the same scenario, several files may exist with different prefixes, here is the meaning of this prefixes:
* No prefix: only contains the contacts placements, the initial and final CoM position and the initial and final wholeBody configuration.
* _COM prefix: also contains the phases duration and the centroidal trajectories (c, dc, ddc, L, dL)
* _REF prefix: also contains the end-effector trajectories for each swing phases
* _WB prefix: also contains all the WholeBody data (q, dq, ddq, tau, contact forces).
Note that the centroidal and end-effector trajectories contained in this file are not exactly the same as the ones in the _REF file, they are computed from the wholeBody motion.
## Scenarios
### com_motion_above_feet
### step_in_place_quasistatic
### step_in_place
### walk_10cm
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