backend.Movement

class backend.Movement

A Movement configuration including - # repetitions - max amplitudes for each finger - rising time - holding time - relaxed position

excluded_params = []
__init__()

Default Initialization to all Ones

update_from_params(params: dict)

Update this object’s attributes using the params dict. Any attributes in the excluded_params list will not be updated

copy()
static movements_list_from_params(params: dict)List[backend.movements.Movement]
static find_moving_dofs(movements: List[backend.movements.Movement], relax_pos=0, n_dof=5)

Return list of dof indices that move at any point in the given list of movements

static shuffle_movements(movements: List[backend.movements.Movement], shuffle_reps=True)

Shuffles the movement list

If shuffle_reps is True, then repetitions of movements will be shuffled. Otherwise, movements will be shuffled but their repetitions will still be grouped together.

Returns a shuffled list of indices corresponding to each movements original (unshuffled) index

n_steps(timestep: float, target=False)

Get the number of timesteps for all repetitions of this movement for the given timestep length

calc_traj(is_target, is_prompt, is_shuffled, timestep=0.033, relax_pos=0, short_prompt=False, n_dof=5)

Calculate the trajectory for this movement returns (traj, high sound index(es), low sound index(es))