3 @file: manipulator_geometry.py
4 @brief: This module provides a class representing the positions and orientations of each of the links of a manipulator.
5 Includes list of relative and absolute transformation matrices and a method for calculating them from given configuration.
6 @author: Nima Ramezani Taghiabadi
8 Faculty of Engineering and Information Technology
9 University of Technology Sydney (UTS)
10 Broadway, Ultimo, NSW 2007, Australia
12 Email(1): Nima.RamezaniTaghiabadi@uts.edu.au
13 Email(2): nima.ramezani@gmail.com
14 Email(3): nima_ramezani@yahoo.com
15 Email(4): ramezanitn@alum.sharif.edu
16 @start date: February 2010
18 Last Revision: 11 August 2015
21 Changes from previous version:
22 1- function set_config_virtual() added
53 self.
theta = numpy.zeros((nlink))
56 self.
alpha = numpy.zeros((nlink))
59 self.
a = numpy.zeros((nlink))
63 self.
d = numpy.zeros((nlink))
74 def __init__(self, config_settings, geo_settings):
75 super(Manipulator_Geometry, self).
__init__(config_settings)
84 self.
ajac = jaclib.Analytic_Jacobian(self.config_settings)
97 def __str__( self, parameter_set = None ) :
98 if parameter_set ==
None:
99 parameter_set = self.str_parameter_set
100 if parameter_set == []:
103 s +=
'Manipulator Configuration:' +
'\n' +
'\n'
104 for p
in parameter_set:
105 value = self.parameter_value(p)
107 s += param +
" "*(45-len(param)) +
': ' + value +
'\n'
116 self.
T = [numpy.eye(4)
for i
in range(0, geo.nlink) ]
117 self.
H = [numpy.eye(4)
for i
in range(0, geo.nlink) ]
119 if self.config_settings.prismatic[0]:
120 self.
T[0] = rotation.DH_transfer_matrix(geo.theta[0], geo.alpha[0], geo.a[0], geo.d[0] + self.q[0])
122 self.
T[0] = rotation.DH_transfer_matrix(geo.theta[0] + self.q[0], geo.alpha[0], geo.a[0], geo.d[0])
124 self.
H[0] = self.
T[0]
126 for i
in range(1, self.config_settings.njoint):
128 if self.config_settings.prismatic[i]:
129 self.
T[i] = rotation.DH_transfer_matrix(geo.theta[i], geo.alpha[i], geo.a[i], geo.d[i] + self.q[i])
131 self.
T[i] = rotation.DH_transfer_matrix(geo.theta[i] + self.q[i], geo.alpha[i], geo.a[i], geo.d[i])
133 self.
H[i] = numpy.dot(self.
H[i-1], self.
T[i])
140 def set_config_virtual(self, qvrd):
141 if super(Manipulator_Geometry, self).set_config_virtual(qvrd):
149 def set_config(self, qd):
150 if super(Manipulator_Geometry, self).set_config(qd):
geo_settings
An instance of class Manipulator_Geometry_Settings containing geometry and dimensions of the manipula...
def __init__
The Class Constructor:
This class contains geometrical properties and dimensional settings of a chained-link manipulator...
nlink
A positive integer containing the number of links of the manipulator.
a
A numpy vector containing the values of the DH parameters.
H
A list of transformation matrices.
theta
A numpy vector containing the values of the DH parameters If the proximal joint of the link is revou...
def transfer_matrices
Use this function to get the current homogeneous transfer matrices of the manipulator.
def __init__
The Class Constructor:
ajac
An instance of class Analytic_Jacobian .
alpha
A numpy vector containing the values of the DH parameters.
def __str__
This function is used to generate a string representing a set of selected object properties and their...
T
A list of homogeneous transformation matrices.
This class contains a list of relative and absolute transfer matrices representing the forward kinema...
d
A numpy vector containing the values of the DH parameters If the joint is prismatic, the value of d[i] is added to q[i] in the transformation matrix.