コード例 #1
0
ファイル: joints.py プロジェクト: efim/arboris-python
    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))
コード例 #2
0
ファイル: joints.py プロジェクト: mitkof6/arboris-python
    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))
コード例 #3
0
ファイル: joints.py プロジェクト: efim/arboris-python
    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)
コード例 #4
0
ファイル: joints.py プロジェクト: mitkof6/arboris-python
    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)
コード例 #5
0
ファイル: joints.py プロジェクト: sbarthelemy/arboris-python
 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)
コード例 #6
0
ファイル: joints.py プロジェクト: bssrdf/arboris-python
 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)