示例#1
0
 def __init__(self, gpos=None, gvel=None, name=None):
     if gpos is None:
         gpos = eye(4)
     if gvel is None:
         gvel = zeros((6))
     self.gpos = array(gpos).reshape((4,4))
     self.gvel = array(gvel).reshape((6))
     Joint.__init__(self, name)
示例#2
0
 def __init__(self, gpos=0., gvel=0., name=None):
     """
     example:
     >>> j = RzJoint(gpos = 3.14/2., gvel = 1.)
     >>> j.gpos
     array([ 1.57])
     >>> j.gvel
     array([ 1.])
     """
     self.gpos = array(gpos).reshape((1))
     self.gvel = array(gvel).reshape((1))
     Joint.__init__(self, name)
示例#3
0
 def __init__(self, gpos=None, gvel=None, name=None):
     """
     example:
     >>> j = FreeJoint()
     >>> j.gpos
     array([[ 1.,  0.,  0.,  0.],
            [ 0.,  1.,  0.,  0.],
            [ 0.,  0.,  1.,  0.],
            [ 0.,  0.,  0.,  1.]])
     >>> j.gvel
     array([ 0.,  0.,  0.,  0.,  0.,  0.])
     """
     if gpos is None:
         gpos = eye(4)
     if gvel is None:
         gvel = zeros((6))
     self.gpos = array(gpos).reshape((4,4))
     self.gvel = array(gvel).reshape((6))
     Joint.__init__(self, name)
示例#4
0
 def __init__(self, gpos=[0.,0.,0.], gvel=[0.,0.,0.], name=None):
     self.gpos = array(gpos).reshape((3))
     self.gvel = array(gvel).reshape((3))
     Joint.__init__(self, name)
示例#5
0
 def __init__(self, gpos=0., gvel=0., frames=None, name=None):
     self.gpos = array(gpos).reshape((1))
     self.gvel = array(gvel).reshape((1))
     Joint.__init__(self, name)