Module Motion Primitive Parser

This module parses the motion primitives.

Motion Primitive Parser

MotionPrimitiveParser class

class Automata.MotionPrimitiveParser.MotionPrimitiveParser[source]
classmethod createFromNode(xmlNode)[source]

Creates a motion primitive from the xml node.

Parameters
  • cls

  • xmlNode – cls and xmlNode are often given together as an element of the list returned by xmlTree.findall(…)

Return type

MotionPrimitive

classmethod createTrajectoryFromPathStates(xmlNode, startState, finalState, timeStepSize)[source]

Creates trajectory state list from the path values described in the xml file.

Parameters
  • cls

  • xmlNode – cls and xmlNode are often given together as the return value of xmlNode.find(…)

  • startState (StartState) – start State of the trajectory

  • finalState (FinalState) – final State of the trajectory

  • timeStepSize (float) – time step size

Other Functions

Automata.MotionPrimitiveParser.create_from_vertices(vertices, t0, orientation=None, velocity=None)[source]

Creates a trajectory from a set of given positions, orientations, velocities and a starting time step.

Parameters
  • vertices (ndarray) – a set of positions for every state of the trajectory

  • t0 (int) – starting time step of the trajectory

  • orientation (Optional[ndarray]) – a set of orientations for every state of the trajectory

  • velocity (Optional[ndarray]) – a set of velocities for every state of the trajectory

Return type

Trajectory

Automata.MotionPrimitiveParser._create_from_unpacked_states(vertices, t0, orientation, velocity=None)[source]

Supports creating a trajectory from a set of given positions, orientations, velocities and a starting time step.

Parameters
  • vertices (ndarray) – a set of orientations for every state of the trajectory

  • t0 (int) – starting time step of the trajectory

  • oriientation – a set of orientations for every state of the trajectory

  • velocity (Optional[ndarray]) – a set of velocities for every state of the trajectory

Return type

Trajectory