|
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) |
|
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.