Class JointDevice

  • Direct Known Subclasses:
    CompositeDevice, CompositeJointDevice, ParallelDevice, SerialDevice, TreeDevice

    public class JointDevice
    extends Device
    A device for a sequence of joints.

    Contrary to for example SerialDevice and TreeDevice, the joints need not
    have any particular ordering within the kinematic tree.

    A JointDevice is a joint for which the values of the configuration Q each
    correspond to a frame of type Joint.

    To implement a Device it is common to derive from JointDevice and just
    add implement methods where your device differs from the standard
    behaviour. Subclasses typically differ in their implementation of setQ()
    and the Jacobian computation.
    • Constructor Detail

      • JointDevice

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

        public JointDevice​(java.lang.String name,
                           FramePtr base,
                           FramePtr end,
                           VectorJoint_p joints,
                           State state)
        Construct the device for a sequence of joints.
        Parameters:
        name - [in] name of device
        base - [in] the base of the device
        end - [in] the end (or tool) of the device
        joints - [in] the joints of the device
        state - [in] the state that shows how frames are connected as
        needed for the computation of Jacobians.
    • Method Detail

      • getCPtr

        public static long getCPtr​(JointDevice obj)
      • delete

        public void delete()
        Overrides:
        delete in class Device
      • getJoints

        public VectorJoint_p getJoints()
        Get all joints of this device
        Returns:
        all joints
      • setQ

        public void setQ​(Q q,
                         State state)
        Description copied from class: Device
        Sets configuration vector \mathbf{q} \in \mathbb{R}^n

        Overrides:
        setQ in class Device
        Parameters:
        q - [in] configuration vector \mathbf{q}
        state - [in] state into which to set \mathbf{q}

      • getQ

        public Q getQ​(State state)
        Description copied from class: Device
        Gets configuration vector \mathbf{q}\in \mathbb{R}^n

        Overrides:
        getQ in class Device
        Parameters:
        state - [in] state from which which to get \mathbf{q}
        Returns:
        configuration vector \mathbf{q}
      • getDOF

        public long getDOF()
        Description copied from class: Device
        Returns number of active joints
        Overrides:
        getDOF in class Device
        Returns:
        number of active joints n
      • getBounds

        public PairQ getBounds()
        Description copied from class: Device
        Returns the upper \mathbf{q}_{min} \in \mathbb{R}^n and
        lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space

        Overrides:
        getBounds in class Device
        Returns:
        std::pair containing (\mathbf{q}_{min}, \mathbf{q}_{max})
      • setBounds

        public void setBounds​(PairQ bounds)
        Description copied from class: Device
        Sets the upper \mathbf{q}_{min} \in \mathbb{R}^n and
        lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space

        Overrides:
        setBounds in class Device
        Parameters:
        bounds - [in] std::pair containing
        (\mathbf{q}_{min}, \mathbf{q}_{max})
      • getVelocityLimits

        public Q getVelocityLimits()
        Description copied from class: Device
        Returns the maximal velocity of the joints
        \mathbf{\dot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}

        Overrides:
        getVelocityLimits in class Device
        Returns:
        the maximal velocity
      • setVelocityLimits

        public void setVelocityLimits​(Q vellimits)
        Description copied from class: Device
        Sets the maximal velocity of the joints
        \mathbf{\dot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \dot{\mathbf{q}}_{min}=-\dot{\mathbf{q}}_{max}

        Overrides:
        setVelocityLimits in class Device
        Parameters:
        vellimits - [in] Q with the maximal velocity
      • getAccelerationLimits

        public Q getAccelerationLimits()
        Description copied from class: Device
        Returns the maximal acceleration of the joints
        \mathbf{\ddot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}

        Overrides:
        getAccelerationLimits in class Device
        Returns:
        the maximal acceleration
      • setAccelerationLimits

        public void setAccelerationLimits​(Q acclimits)
        Description copied from class: Device
        Sets the maximal acceleration of the joints
        \mathbf{\ddot{q}}_{max}\in \mathbb{R}^n

        It is assumed that \ddot{\mathbf{q}}_{min}=-\ddot{\mathbf{q}}_{max}

        Overrides:
        setAccelerationLimits in class Device
        Parameters:
        acclimits - [in] the maximal acceleration
      • getBase

        public Frame getBase()
        Description copied from class: Device
        a method to return the frame of the base of the device.
        Overrides:
        getBase in class Device
        Returns:
        the base frame
      • getEnd

        public Frame getEnd()
        Description copied from class: Device
        a method to return the frame of the end of the device
        Overrides:
        getEnd in class Device
        Returns:
        the end frame