Module Motion Primitive

A primitive is a short trajectory. It consists of a consecutive list of states (position, velocity, orientation, time step). All motion primitives start at position [0,0] and time step = 0. A typical usage is to translate it to the current state (function: translate_primitive_to_current_pos). Afterwards you can append the translated primitive to your current path: append_path(currentPath, translated_primitve).

Motion Primitive

MotionPrimitive class

class Automata.MotionPrimitive.MotionPrimitive(startState, finalState, timeStepSize, trajectory)[source]
mirror()[source]

Mirrors the current primitive so that it describes a primitive in the opposite direction.

Return type

None

checkConnectivityToNext(other)[source]

Any primitive whose first state’s velocity is in the velocity range of the last state of the current primitive is considered as connected. Returns true if the two primitives are connected.

Parameters

other (MotionPrimitive) – the next motion primitive to be checked

Return type

bool

appendTrajectoryToState(state)[source]

Appends the primitive to the given state and returns the new list of states including the intermediate steps.

Parameters

state (State) – the trajectory will be appended to this state

Return type

List[State]

costs()[source]

Returns euclidean distance between the last state of current primitive and [0,0].

Return type

float