|
MAGIKS
1.1
Manipulator General Inverse Kinematic Solver
|
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...
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 | |
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.
| def __init__ | ( | self, | |
dimension = 3, |
|||
capacity = 3 |
|||
| ) |
Class Constructor.
| dimension | A positive integer specifying the dimension of the space in which the trajectory segment is defined |
Definition at line 633 of file trajectory.py.
| def __getitem__ | ( | self, | |
| phi | |||
| ) |
Definition at line 747 of file trajectory.py.
| def __str__ | ( | self | ) |
String representation of the instance (trajectory segment)
| None |
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.
| phi | The phase value ( \( \phi \)) of the key point to be added |
| pos | The desired position vector at the key point to be added |
| vel | The desired velocity vector at the key point to be added |
| acc | The desired acceleration vector at the key point to be added |
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.
| None |
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.
| phi | A float specifying the desired phase value. The given value must not exceed the phase of the last key point. |
Definition at line 718 of file trajectory.py.
| def set_phi | ( | self, | |
| phi | |||
| ) |
Sets the current phase value.
| phi | A float specifying the desired phase value. The given value must not exceed the phase of the last key point. |
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.
| 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.
1.8.8