示例#1
0
    def __init__(self):
        modelSettings = settings.ModelSettings().get()

        theta1 = sp.symbols('theta1')
        theta2 = sp.symbols('theta2')
        theta3 = sp.symbols('theta3')
        theta4 = sp.symbols('theta4')
        theta5 = sp.symbols('theta5')

        d1 = modelSettings['d1']
        alpha1 = math.radians(-90)
        a2 = modelSettings['a2']
        a3 = modelSettings['a3']
        alpha4 = math.radians(-90)

        self._0T1 = trHomogene.dhMatrix(theta1, 0, d1, alpha1)
        self._1T2 = trHomogene.dhMatrix(theta2, a2, 0, 0)
        self._2T3 = trHomogene.dhMatrix(theta3, a3, 0, 0)
        self._3T4 = trHomogene.dhMatrix(theta4, 0, 0, alpha4)
        self._4Tf = trHomogene.dhMatrix(theta5, 0, 0, 0)

        self._0Tf = self._0T1 * self._1T2 * self._2T3 * self._3T4 * self._4Tf
示例#2
0
    def __init__(self):
        modelSettings = settings.ModelSettings().get()

        theta1 = sp.symbols("theta1")
        theta2 = sp.symbols("theta2")
        theta3 = sp.symbols("theta3")
        theta4 = sp.symbols("theta4")
        theta5 = sp.symbols("theta5")

        d1 = modelSettings["d1"]
        alpha1 = math.radians(-90)
        a2 = modelSettings["a2"]
        a3 = modelSettings["a3"]
        alpha4 = math.radians(-90)

        self._0T1 = trHomogene.dhMatrix(theta1, 0, d1, alpha1)
        self._1T2 = trHomogene.dhMatrix(theta2, a2, 0, 0)
        self._2T3 = trHomogene.dhMatrix(theta3, a3, 0, 0)
        self._3T4 = trHomogene.dhMatrix(theta4, 0, 0, alpha4)
        self._4Tf = trHomogene.dhMatrix(theta5, 0, 0, 0)

        self._0Tf = self._0T1 * self._1T2 * self._2T3 * self._3T4 * self._4Tf
示例#3
0
import sys
sys.path.insert(0, "../robotModel/")
import trHomogene
import sympy as sp

sp.init_printing()

theta = sp.symbols('theta')
a = sp.symbols('a')
d = sp.symbols('d')
alpha = sp.symbols('alpha')

print ""
print "rotX :"
print trHomogene.rotX(theta)

print ""
print "rotY :"
print trHomogene.rotY(theta)

print ""
print "rotZ :"
print trHomogene.rotZ(theta)

print ""
print "dhMatrix :"
print trHomogene.dhMatrix(theta, a, d, alpha)
import sys
sys.path.insert(0,"../robotModel/")
import trHomogene
import sympy as sp

sp.init_printing()

theta = sp.symbols('theta')
a     = sp.symbols('a')
d     = sp.symbols('d')
alpha = sp.symbols('alpha')

print ""
print "rotX :"
print trHomogene.rotX(theta)

print ""
print "rotY :"
print trHomogene.rotY(theta)

print ""
print "rotZ :"
print trHomogene.rotZ(theta)

print ""
print "dhMatrix :"
print trHomogene.dhMatrix(theta,a,d,alpha)