Beispiel #1
0
    def __init__(self, gpos=None, gvel=None, name=None):
        """ A free joint, with no dof constrained.

        :param gpos: initial generalized joint position, a homogeneous matrix
        :type  gpos: (4,4)-array
        :param gvel: initial generalized joint velocity, a twist
        :type  gvel: (6,)-array
        :param string name: the joint name

        **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.])

        """
        Joint.__init__(self, name)
        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))
Beispiel #2
0
    def __init__(self, gpos=None, gvel=None, name=None):
        """ A free joint, with no dof constrained.

        :param gpos: initial generalized joint position, a homogeneous matrix
        :type  gpos: (4,4)-array
        :param gvel: initial generalized joint velocity, a twist
        :type  gvel: (6,)-array
        :param string name: the joint name

        **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.])

        """
        Joint.__init__(self, name)
        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))
Beispiel #3
0
    def __init__(self, name=None):
        """ A fixed joint where all dof are constrained.

        :param string name: the joint name

        **Example:**

        >>> j = FreeJoint()
        >>> print j.gpos
        []

        """
        Joint.__init__(self, name)
Beispiel #4
0
    def __init__(self, name=None):
        """ A fixed joint where all dof are constrained.

        :param string name: the joint name

        **Example:**

        >>> j = FreeJoint()
        >>> print j.gpos
        []

        """
        Joint.__init__(self, name)
Beispiel #5
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)
Beispiel #6
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)