Class SerialDevicePtr

  • public class SerialDevicePtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • SerialDevicePtr

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

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

        public SerialDevicePtr​(SerialDevice 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 SerialDevice deref()
        The pointer stored in the object.
      • __ref__

        public SerialDevice __ref__()
        Dereferencing operator.
      • getDeref

        public SerialDevice getDeref()
        Member access operator.
      • isShared

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

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

        public FrameVector frames()
        Frames of the device.

        This method is being used when displaying the kinematic
        structure of devices in RobWorkStudio. The method really
        isn't of much use for everyday programming.

        list of raw Frame pointers.
      • getJoints

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

        public void setQ​(Q q,
                         State state)
      • getQ

        public Q getQ​(State state)
      • getDOF

        public long getDOF()
      • getBounds

        public PairQ getBounds()
      • setBounds

        public void setBounds​(PairQ bounds)
      • getVelocityLimits

        public Q getVelocityLimits()
      • setVelocityLimits

        public void setVelocityLimits​(Q vellimits)
      • getAccelerationLimits

        public Q getAccelerationLimits()
      • setAccelerationLimits

        public void setAccelerationLimits​(Q acclimits)
      • getBase

        public Frame getBase()
      • getEnd

        public Frame getEnd()
      • getName

        public java.lang.String getName()
        Returns the name of the device
        name of the device
      • setName

        public void setName​(java.lang.String name)
        Sets the name of the Device
        name - [in] the new name of the frame
      • baseTframe

        public Transform3D baseTframe​(FrameCPtr f,
                                      State state)
        Calculates the homogeneous transform from base to a frame f
        the homogeneous transform \robabx{b}{f}{\mathbf{T}}
      • baseTend

        public Transform3D baseTend​(State state)
        Calculates the homogeneous transform from base to the end frame
        the homogeneous transform \robabx{base}{end}{\mathbf{T}}
      • worldTbase

        public Transform3D worldTbase​(State state)
        Calculates the homogeneous transform from world to base \robabx{w}{b}{\mathbf{T}}

        the homogeneous transform \robabx{w}{b}{\mathbf{T}}
      • baseJframe

        public Jacobian baseJframe​(FrameCPtr frame,
                                   State state)
        Calculates the jacobian matrix of a frame f described in the
        robot base frame ^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

        frame - [in] Frame for which to calculate the Jacobian
        state - [in] State for which to calculate the Jacobian

        the 6*ndof jacobian matrix: {^{base}_{frame}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})

        This method calculates the jacobian relating joint velocities ( \mathbf{\dot{q}} ) to the frame f velocity seen from base-frame
        ( \nu^{base}_{frame} )

        \nu^{base}_{frame} = {^{base}_{frame}}\mathbf{J}_\mathbf{q}(\mathbf{q})\mathbf{\dot{q}}

        The jacobian matrix {^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q})
        is defined as:

        {^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \frac{\partial ^{base}\mathbf{x}_n}{\partial \mathbf{q}}

        By default the method forwards to baseJframes().
      • baseJframes

        public Jacobian baseJframes​(FrameVector frames,
                                    State state)
        The Jacobian for a sequence of frames.

        A Jacobian is computed for each of the frames and the Jacobians are
        stacked on top of eachother.
        frames - [in] the frames to calculate the frames from
        state - [in] the state to calculate in
        the jacobian
      • baseJCend

        public JacobianCalculatorPtr baseJCend​(State state)
        DeviceJacobian for the end frame.

        By default this method forwards to baseDJframe().
      • baseJCframe

        public JacobianCalculatorPtr baseJCframe​(FrameCPtr frame,
                                                 State state)
        DeviceJacobian for a particular frame.

        By default this method forwards to baseDJframes().
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • registerIn

        public void registerIn​(State state)
        initialize this stateless data to a specific state
        state - [in] the state in which to register the data.

        Note: the data will be registered in the state structure of the state
        and any copies or other instances of the state will therefore also
        contain the added states.
      • registerIn

        public void registerIn​(StateStructurePtr state)
        register this stateless object in a statestructure.
      • unregister

        public void unregister()
        unregisters all state data of this stateless object
      • getStateStructure

        public StateStructurePtr getStateStructure()
        Get the state structure.
        the state structure.
      • isRegistered

        public boolean isRegistered()
        Check if object has registered its state.
        true if registered, false otherwise.