Class DependentJointCPtr


  • public class DependentJointCPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DependentJoint __ref__()
      Dereferencing operator.
      void delete()  
      DependentJoint deref()
      The pointer stored in the object.
      boolean equals​(DependentJoint p)  
      Transform3D fTf​(FrameCPtr to, State state)
      Get the transform of other frame relative to this frame.
      PairQ getBounds()
      Gets joint bounds
      StateCachePtr getCache​(State state)
      Get the cache.
      static long getCPtr​(DependentJointCPtr obj)  
      DependentJoint getDeref()
      Member access operator.
      int getDOF()
      The number of degrees of freedom (dof) of the frame.

      The dof is the number of joint values that are used for controlling
      the frame.

      Given a set joint values of type State, the getDof() number of joint
      values for the frame can be read and written with State::getQ() and
      State::setQ().

      Transform3D getFixedTransform()
      get the fixed transform from parent to this joint

      Notice that this does not include the actual rotation of the joint (its state)
      only its fixed transform.

      int getID()
      An integer ID for the StateData.

      IDs are assigned to the state data upon insertion State.
      StateData that are not in a State have an ID of -1.

      StateData present in different trees may have identical IDs.

      IDs are used for the efficient implementation of State.
      void getJacobian​(long row, long col, Transform3D joint, Transform3D tcp, State state, Jacobian jacobian)
      Finds the Jacobian of the joints and adds it in jacobian.

      Calculates the Jacobian contribution to the device Jacobian when controlling a frame
      tcp and given a current joint pose joint.

      The values are stored from row row to row+5 and column col to
      col+(joint.getDOF()-1).

      Transform3D getJointTransform​(State state)
      get the isolated joint transformation which is purely dependent on
      q.
      Q getMaxAcceleration()
      Gets max acceleration of joint
      Q getMaxVelocity()
      Gets max velocity of joint
      java.lang.String getName()
      The name of the state data.

      Transform3D getTransform​(State state)
      The transform of the frame relative to its parent.

      The transform is calculated for the joint values of state.

      The exact implementation of getTransform() depends on the type of
      frame.
      boolean hasCache()
      Check is state data includes a cache.
      boolean isActive()
      a joint is active if its motorized/controlled in some
      fasion.
      boolean isControlledBy​(Joint joint)
      Returns true if the DependentJoint is controlled by joint.

      A DependentJoint may depend on more than one joints.

      boolean isNull()
      checks if the pointer is null
      boolean isShared()
      check if this Ptr has shared ownership or none
      ownership
      void multiplyTransform​(Transform3D parent, State state, Transform3D result)
      Post-multiply the transform of the frame to the parent transform.

      The transform is calculated for the joint values of state.

      The exact implementation of getTransform() depends on the type of
      frame.
      void setData​(State state, double val)
      Assign for state data the size() of values of the array
      vals.

      The array vals must be of length at least size().

      void setData​(State state, vector_d vals)
      Assign for state data the size() of values of the array
      vals.

      The array vals must be of length at least size().

      int size()
      The number of doubles allocated by this StateData in
      each State object.

      Transform3D wTf​(State state)
      Get the transform relative to world.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DependentJointCPtr

        public DependentJointCPtr​(long cPtr,
                                  boolean cMemoryOwn)
      • DependentJointCPtr

        public DependentJointCPtr()
        Default constructor yielding a NULL-pointer.
      • DependentJointCPtr

        public DependentJointCPtr​(DependentJoint ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • deref

        public DependentJoint deref()
        The pointer stored in the object.
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • isControlledBy

        public boolean isControlledBy​(Joint joint)
        Returns true if the DependentJoint is controlled by joint.

        A DependentJoint may depend on more than one joints.

        Parameters:
        joint - [in] Joints to test with
        Returns:
        True if this is controlled by joint
      • getBounds

        public PairQ getBounds()
        Gets joint bounds
        Returns:
        the lower and upper bound of this joint
      • getMaxVelocity

        public Q getMaxVelocity()
        Gets max velocity of joint
        Returns:
        the maximum velocity of the joint
      • getMaxAcceleration

        public Q getMaxAcceleration()
        Gets max acceleration of joint
        Returns:
        the maximum acceleration of the joint
      • getJacobian

        public void getJacobian​(long row,
                                long col,
                                Transform3D joint,
                                Transform3D tcp,
                                State state,
                                Jacobian jacobian)
        Finds the Jacobian of the joints and adds it in jacobian.

        Calculates the Jacobian contribution to the device Jacobian when controlling a frame
        tcp and given a current joint pose joint.

        The values are stored from row row to row+5 and column col to
        col+(joint.getDOF()-1).

        Parameters:
        row - [in] Row where values should be stored
        col - [in] Column where values should be stored
        joint - [in] Transform of the joint
        tcp - [in] Transformation of the point to control
        state -
        jacobian - [in] Jacobian to which to add the results.
      • getFixedTransform

        public Transform3D getFixedTransform()
        get the fixed transform from parent to this joint

        Notice that this does not include the actual rotation of the joint (its state)
        only its fixed transform.

        Returns:
        fixed part of transform from paretn to joint
      • getJointTransform

        public Transform3D getJointTransform​(State state)
        get the isolated joint transformation which is purely dependent on
        q.
        Parameters:
        state - [in] the state from which to extract q
        Returns:
        the joint transformation
      • isActive

        public boolean isActive()
        a joint is active if its motorized/controlled in some
        fasion. passive or non-active joints are typically used in parrallel robots.
        Returns:
      • multiplyTransform

        public void multiplyTransform​(Transform3D parent,
                                      State state,
                                      Transform3D result)
        Post-multiply the transform of the frame to the parent transform.

        The transform is calculated for the joint values of state.

        The exact implementation of getTransform() depends on the type of
        frame. See for example RevoluteJoint and PrismaticJoint.

        Parameters:
        parent - [in] The world transform of the parent frame.
        state - [in] Joint values for the forward kinematics tree.
        result - [in] The transform of the frame in the world frame.
      • getTransform

        public Transform3D getTransform​(State state)
        The transform of the frame relative to its parent.

        The transform is calculated for the joint values of state.

        The exact implementation of getTransform() depends on the type of
        frame. See for example RevoluteJoint and PrismaticJoint.

        Parameters:
        state - [in] Joint values for the forward kinematics tree.

        Returns:
        The transform of the frame relative to its parent.
      • getDOF

        public int getDOF()
        The number of degrees of freedom (dof) of the frame.

        The dof is the number of joint values that are used for controlling
        the frame.

        Given a set joint values of type State, the getDof() number of joint
        values for the frame can be read and written with State::getQ() and
        State::setQ().

        Returns:
        The number of degrees of freedom of the frame.
      • wTf

        public Transform3D wTf​(State state)
        Get the transform relative to world.
        Parameters:
        state - [in] the state.
        Returns:
        transform relative to world.
      • fTf

        public Transform3D fTf​(FrameCPtr to,
                               State state)
        Get the transform of other frame relative to this frame.
        Parameters:
        to - [in] the other frame
        state - [in] the state.
        Returns:
        transform of frame to relative to this frame.
      • getID

        public int getID()
        An integer ID for the StateData.

        IDs are assigned to the state data upon insertion State.
        StateData that are not in a State have an ID of -1.

        StateData present in different trees may have identical IDs.

        IDs are used for the efficient implementation of State. Normally,
        you should not make use of StateData IDs yourself.

        Returns:
        An integer ID for the frame.
      • getName

        public java.lang.String getName()
        The name of the state data.

        Returns:
        The name of the state data.
      • size

        public int size()
        The number of doubles allocated by this StateData in
        each State object.

        Returns:
        The number of doubles allocated by the StateData
      • setData

        public void setData​(State state,
                            vector_d vals)
        Assign for state data the size() of values of the array
        vals.

        The array vals must be of length at least size().

        Parameters:
        state - [inout] The state to which vals are written.

        vals - [in] The joint values to assign.

        setData() and getData() are related as follows:
        data.setData(state, q_in); const double* q_out = data.getData(state); for (int i = 0; i < data.getDOF(); i++) q_in[i] == q_out[i];
      • setData

        public void setData​(State state,
                            double val)
        Assign for state data the size() of values of the array
        vals.

        The array vals must be of length at least size().

        Parameters:
        state - [inout] The state to which vals are written.



        setData() and getData() are related as follows:
        data.setData(state, q_in); const double* q_out = data.getData(state); for (int i = 0; i < data.getDOF(); i++) q_in[i] == q_out[i];
      • hasCache

        public boolean hasCache()
        Check is state data includes a cache.
        Returns:
        true if cache, false otherwise.
      • getCache

        public StateCachePtr getCache​(State state)
        Get the cache.
        Parameters:
        state - [in] the state.
        Returns:
        the cache.