コード例 #1
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

from kinematics import Kinematics
from robots import table1
from robots import table_sr400

kin = Kinematics(table1)
kin.set_q([1, 1, 1])
assert(kin.ajoints[0].q == 1)

from kinematics import get_looproot
kin = Kinematics(table_sr400)
jnts = kin.joints
assert(get_looproot(jnts, jnts[9]) == jnts[0])

from kinematics import get_loops
kin = Kinematics(table_sr400)
jnts = kin.joints
assert(get_loops(jnts) == [(jnts[0], jnts[8])])

コード例 #2
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

from math import cos, sin
from numpy import matrix
from numpy import allclose
from numpy import zeros
from numpy import concatenate
from kinematics import Kinematics
from jacobians import serialKinematicJacobian as jacobian
from robots import table_rx90

kin = Kinematics(table_rx90)
kin.set_q([0.1, 0.2, 0.3, 0.4, 0.5, 0.6])
jnts = kin.joints

# This jacobian is obtained from the course 'Modeling and Control of Manipulators' of Wisama Khalil
numer_jac = matrix([[-10.2079, -408.5824, -349.2793,  0,       0,       0],
                     [101.7389, -40.9950,  -35.0448,   0,       0,       0],
                     [0,         102.2498, -191.7702,  0,       0,       0],
                     [0,         0.0998,    0.0998,   -0.4770,  0.4320, -0.7856],
                     [0,        -0.9950,   -0.9950,   -0.0479, -0.8823, -0.2665],
                     [1.0000,    0.0000,    0.0000,    0.8776,  0.1867,  0.5584]
                    ])
J = jacobian(jnts)
assert allclose(numer_jac, J, rtol=8e-04)

# From "Robots-manipulateurs de type série" - Wisama Khalil, Etienne Dombre, p.12.
# http://www.gdr-robotique.org/cours_de_robotique/?id=fd80a49ceaa004030c95cdacb020ec69.
# In French.
q0, q1, q2, q3, q4, q5 = kin.get_q()
コード例 #3
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

from kinematics import Kinematics
from robots import table1
from robots import table_sr400

kin = Kinematics(table1)
kin.set_q([1, 1, 1])
assert (kin.ajoints[0].q == 1)

from kinematics import get_looproot

kin = Kinematics(table_sr400)
jnts = kin.joints
assert (get_looproot(jnts, jnts[9]) == jnts[0])

from kinematics import get_loops

kin = Kinematics(table_sr400)
jnts = kin.joints
assert (get_loops(jnts) == [(jnts[0], jnts[8])])
コード例 #4
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

from math import cos, sin
from numpy import matrix
from numpy import allclose
from numpy import zeros
from numpy import concatenate
from kinematics import Kinematics
from jacobians import serialKinematicJacobian as jacobian
from robots import table_rx90

kin = Kinematics(table_rx90)
kin.set_q([0.1, 0.2, 0.3, 0.4, 0.5, 0.6])
jnts = kin.joints

# This jacobian is obtained from the course 'Modeling and Control of Manipulators' of Wisama Khalil
numer_jac = matrix([[-10.2079, -408.5824, -349.2793, 0, 0, 0],
                    [101.7389, -40.9950, -35.0448, 0, 0, 0],
                    [0, 102.2498, -191.7702, 0, 0, 0],
                    [0, 0.0998, 0.0998, -0.4770, 0.4320, -0.7856],
                    [0, -0.9950, -0.9950, -0.0479, -0.8823, -0.2665],
                    [1.0000, 0.0000, 0.0000, 0.8776, 0.1867, 0.5584]])
J = jacobian(jnts)
assert allclose(numer_jac, J, rtol=8e-04)

# From "Robots-manipulateurs de type série" - Wisama Khalil, Etienne Dombre, p.12.
# http://www.gdr-robotique.org/cours_de_robotique/?id=fd80a49ceaa004030c95cdacb020ec69.
# In French.
q0, q1, q2, q3, q4, q5 = kin.get_q()
c1 = cos(q0)