pinocchio  3.2.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
FootSteps Class Reference
Inheritance diagram for FootSteps:
Collaboration diagram for FootSteps:

Public Member Functions

def __init__ (self, right, left)
 
def add_phase (self, duration, foot, position=None)
 
def get_index_from_time (self, t)
 
def get_left_next_position (self, t)
 
def get_left_position (self, t)
 
def get_phase_duration (self, t)
 
def get_phase_remaining (self, t)
 
def get_phase_start (self, t)
 
def get_phase_type (self, t)
 
def get_right_next_position (self, t)
 
def get_right_position (self, t)
 
def is_double_from_left_to_right (self, t)
 

Public Attributes

 flying_foot
 
 left
 
 right
 
 time
 

Detailed Description

The class stores three functions of time: left, right and flying_foot.
Each function is piecewise constant. For each function, the user can ask
what is the value of this function at time t.

The storage is composed of three lists for left, right and flying_foot, and a list for time.
The list of times stores the time intervals, i.e. each element of the list is
the start of a time interval. The first element of the list is 0.
The value of the functions left, right, flying_foot one this time interval is stored at
the same position is their respective list (i.e. value of left on interval
[time[i], time[i+1]] is stored in left[i].

The 4 lists are set up using function add_phase().
The values of functions left, right, flying_foot can be accessed through the function
get_phase_type(t), get_left_position(t), get_right_position(t).
phase_type are 'left' (meaning left foot is flying, right foot is fixed), 'right' (ie the opposite)
or 'none' (meaning no foot is flying, both are fixed on the ground).

Additionnally, functions get_left_next_position(t),
get_right_next_position(t) can be used to get the next position of the
flying foot (in that case, additional work is needed to compute the
position of flying foot at time t by interpolating get_left_position(t)
and get_left_next_position(t).

Functions get_phase_start(t), get_phase_duration(t) and get_phase_remaining(t)
can be used to get the starting time, the duration and the remaining time of the
current phase at time t.

Definition at line 1 of file foot_steps.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  right,
  left 
)
The class is initiated from the initial positions of left and right feet.

Definition at line 31 of file foot_steps.py.

Member Function Documentation

◆ add_phase()

def add_phase (   self,
  duration,
  foot,
  position = None 
)
Add a phase lasting <duration> where the flyhing foot <foot> (either 'left' or 'right')
moves to <position> (being a vector or a SE3 placement).
Alternatively, <foot> might be set to 'none' (i.e double support). In that case, <position>
is not specified (or is set to None, default).

Definition at line 40 of file foot_steps.py.

◆ get_index_from_time()

def get_index_from_time (   self,
  t 
)
Return the index i of the interval containing t, i.e. t in time[i], time[i+1]

Definition at line 57 of file foot_steps.py.

◆ is_double_from_left_to_right()

def is_double_from_left_to_right (   self,
  t 
)
Suppose that phase at time <t> is a double support phase.
Return True if the previous phase is left and/or the next phase is right.

Definition at line 67 of file foot_steps.py.


The documentation for this class was generated from the following file: