MAGIKS  1.1
Manipulator General Inverse Kinematic Solver
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
Path Class Reference

This class contains properties and methods for a Trajectory Segment A trajectory is established of one segment or a number of segments connected together creating a path in the space. More...

Inheritance diagram for Path:
Orientation_Path Path_Polynomial Orientation_Path_Polynomial Orientation_Path_Polynomial

Public Member Functions

def __init__
 Class Constructor. More...
 
def __str__
 String representation of the instance (trajectory segment) More...
 
def add_point
 Use this function to append a key point to the end of the trajectory segment. More...
 
def points_dist
 Computes the euclidean distances of each key point from the next and return the result in a vector. More...
 
def closest_keypoint_number
 
def get_keypoint
 
def set_phase
 Sets the current phase value. More...
 
def __getitem__
 
def set_phi
 Sets the current phase value. More...
 
def map_phi
 
def current_value
 
def plot
 
def scatter_plot
 

Public Attributes

 current_phi
 
 phi_end
 A float indicating the phase of the last key point (Maximum value for phi) More...
 
 npoint
 An integer indicating the number of points. More...
 
 capacity
 An integer indicating how many key points the path can hold. More...
 
 dim
 
 current_position
 
 current_velocity
 
 current_acceleration
 
 plot_settings
 
 point
 
 phi_start
 

Detailed Description

This class contains properties and methods for a Trajectory Segment A trajectory is established of one segment or a number of segments connected together creating a path in the space.

Each segment, contains a number of instances of class Key_Point().

Definition at line 629 of file trajectory.py.

Constructor & Destructor Documentation

def __init__ (   self,
  dimension = 3,
  capacity = 3 
)

Class Constructor.

Parameters
dimensionA positive integer specifying the dimension of the space in which the trajectory segment is defined

Definition at line 633 of file trajectory.py.

Member Function Documentation

def __getitem__ (   self,
  phi 
)

Definition at line 747 of file trajectory.py.

def __str__ (   self)

String representation of the instance (trajectory segment)

Parameters
None
Returns
A string containing the main information about the trajectory segment

Definition at line 657 of file trajectory.py.

def add_point (   self,
  phi,
  pos,
  vel = None,
  acc = None 
)

Use this function to append a key point to the end of the trajectory segment.

Parameters
phiThe phase value ( \( \phi \)) of the key point to be added
posThe desired position vector at the key point to be added
velThe desired velocity vector at the key point to be added
accThe desired acceleration vector at the key point to be added
Returns
None

Definition at line 672 of file trajectory.py.

def closest_keypoint_number (   self,
  phi = None 
)

Definition at line 702 of file trajectory.py.

def current_value (   self,
  field_name = 'Position',
  axis = 0 
)

Definition at line 789 of file trajectory.py.

def get_keypoint (   self,
  point_number 
)

Definition at line 711 of file trajectory.py.

def map_phi (   self,
  phi_start = 0,
  phi_end = 1.0 
)
Maps the current trajectory phase interval to the given interval (phi_start, phi_end)
and adjusts all keypoint phases, velocities and accelerations accordingly
The segment will be interpolated after that
Also the current_phi will be changed to the mapped value

Definition at line 762 of file trajectory.py.

def plot (   self,
  axis = 0,
  n = 100,
  show_points = False 
)

Definition at line 800 of file trajectory.py.

def points_dist (   self)

Computes the euclidean distances of each key point from the next and return the result in a vector.

The segment must have at least two key points, otherwise an error is printed and None is returned.

Parameters
None
Returns
A numpy vector containing the distance between the points

Definition at line 692 of file trajectory.py.

def scatter_plot (   self,
  figure = 'Position',
  axis_x = 0,
  axis_y = 1,
  n = 100,
  y_text = "",
  show_points = False 
)

Definition at line 853 of file trajectory.py.

def set_phase (   self,
  phi 
)

Sets the current phase value.

Parameters
phiA float specifying the desired phase value. The given value must not exceed the phase of the last key point.
Returns
None

Definition at line 718 of file trajectory.py.

def set_phi (   self,
  phi 
)

Sets the current phase value.

Parameters
phiA float specifying the desired phase value. The given value must not exceed the phase of the last key point.
Returns
None
check phi to be valid. Many changes must be delivered. 
    1- current_position must be a function returning property pos

Definition at line 755 of file trajectory.py.

Member Data Documentation

capacity

An integer indicating how many key points the path can hold.

Definition at line 643 of file trajectory.py.

current_acceleration

Definition at line 648 of file trajectory.py.

current_phi

Definition at line 637 of file trajectory.py.

current_position

Definition at line 646 of file trajectory.py.

current_velocity

Definition at line 647 of file trajectory.py.

dim

Definition at line 645 of file trajectory.py.

npoint

An integer indicating the number of points.

Definition at line 641 of file trajectory.py.

phi_end

A float indicating the phase of the last key point (Maximum value for phi)

Definition at line 639 of file trajectory.py.

phi_start

Definition at line 769 of file trajectory.py.

plot_settings

Definition at line 650 of file trajectory.py.

point

Definition at line 652 of file trajectory.py.


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