Package org.robwork.sdurw
Class SerialDeviceCPtr
- java.lang.Object
-
- org.robwork.sdurw.SerialDeviceCPtr
-
public class SerialDeviceCPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description SerialDeviceCPtr()Default constructor yielding a NULL-pointer.SerialDeviceCPtr(long cPtr, boolean cMemoryOwn)SerialDeviceCPtr(SerialDevice ptr)Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SerialDevice__ref__()Dereferencing operator.JacobianCalculatorPtrbaseJCframes(FrameVector frames, State state)JacobianbaseJend(State state)JacobianbaseJframe(Frame 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})
JacobianbaseJframes(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.Transform3DdbaseTend(State state)Calculates the homogeneous transform from base to the end frame
\robabx{base}{end}{\mathbf{T}}Transform3DdbaseTframe(Frame f, State state)Calculates the homogeneous transform from base to a frame f
\robabx{b}{f}{\mathbf{T}}voiddelete()SerialDevicederef()The pointer stored in the object.booleanequals(SerialDevice p)FrameVectorframes()Frames of the device.
This method is being used when displaying the kinematic
structure of devices in RobWorkStudio.QgetAccelerationLimits()PairQgetBounds()static longgetCPtr(SerialDeviceCPtr obj)SerialDevicegetDeref()Member access operator.longgetDOF()JointPointerVectorgetJoints()Get all joints of this devicejava.lang.StringgetName()Returns the name of the deviceQgetQ(State state)QgetVelocityLimits()booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipvoidsetQ(Q q, State state)Transform3DdworldTbase(State state)Calculates the homogeneous transform from world to base \robabx{w}{b}{\mathbf{T}}
-
-
-
Constructor Detail
-
SerialDeviceCPtr
public SerialDeviceCPtr(long cPtr, boolean cMemoryOwn)
-
SerialDeviceCPtr
public SerialDeviceCPtr()
Default constructor yielding a NULL-pointer.
-
SerialDeviceCPtr
public SerialDeviceCPtr(SerialDevice ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(SerialDeviceCPtr obj)
-
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.
-
equals
public boolean equals(SerialDevice p)
-
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
-
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.
- Returns:
- list of raw Frame pointers.
-
getJoints
public JointPointerVector getJoints()
Get all joints of this device- Returns:
- all joints
-
getDOF
public long getDOF()
-
getBounds
public PairQ getBounds()
-
getVelocityLimits
public Q getVelocityLimits()
-
getAccelerationLimits
public Q getAccelerationLimits()
-
baseJCframes
public JacobianCalculatorPtr baseJCframes(FrameVector frames, State state)
-
getName
public java.lang.String getName()
Returns the name of the device- Returns:
- name of the device
-
baseTframe
public Transform3Dd baseTframe(Frame f, State state)
Calculates the homogeneous transform from base to a frame f
\robabx{b}{f}{\mathbf{T}}- Returns:
- the homogeneous transform \robabx{b}{f}{\mathbf{T}}
-
baseTend
public Transform3Dd baseTend(State state)
Calculates the homogeneous transform from base to the end frame
\robabx{base}{end}{\mathbf{T}}- Returns:
- the homogeneous transform \robabx{base}{end}{\mathbf{T}}
-
worldTbase
public Transform3Dd worldTbase(State state)
Calculates the homogeneous transform from world to base \robabx{w}{b}{\mathbf{T}}
- Returns:
- the homogeneous transform \robabx{w}{b}{\mathbf{T}}
-
baseJframe
public Jacobian baseJframe(Frame 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})
- Parameters:
frame- [in] Frame for which to calculate the Jacobianstate- [in] State for which to calculate the Jacobian
- Returns:
- 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.- Parameters:
frames- [in] the frames to calculate the frames fromstate- [in] the state to calculate in- Returns:
- the jacobian
-
-