Package org.robwork.sdurw
Class CompositeDevicePtr
- java.lang.Object
-
- org.robwork.sdurw.CompositeDevicePtr
-
public class CompositeDevicePtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description CompositeDevicePtr()
Default constructor yielding a NULL-pointer.CompositeDevicePtr(long cPtr, boolean cMemoryOwn)
CompositeDevicePtr(CompositeDevice 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 CompositeDevice
__ref__()
Dereferencing operator.DeviceCPtr
asDeviceCPtr()
DevicePtr
asDevicePtr()
JointDeviceCPtr
asJointDeviceCPtr()
JointDevicePtr
asJointDevicePtr()
JacobianCalculatorPtr
baseJCframes(FrameVector frames, State state)
Jacobian
baseJend(State state)
Jacobian
baseJends(State state)
like Device::baseJend() but with a Jacobian calculated for all
end-effectors (see getEnds()).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})
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.Transform3Dd
baseTend(State state)
Calculates the homogeneous transform from base to the end frame
\robabx{base}{end}{\mathbf{T}}Transform3Dd
baseTframe(Frame f, State state)
Calculates the homogeneous transform from base to a frame f
\robabx{b}{f}{\mathbf{T}}void
delete()
CompositeDevice
deref()
The pointer stored in the object.boolean
equals(CompositeDevice p)
Q
getAccelerationLimits()
Frame
getBase()
PairQ
getBounds()
static long
getCPtr(CompositeDevicePtr obj)
CompositeDevice
getDeref()
Member access operator.long
getDOF()
Frame
getEnd()
FrameVector
getEnds()
The end-effectors of the composite device.
The end-effectors of the composite device are the end-effectors of
the devices from which the composite device was constructed.
This sequence of end-effectors may or may not include the default
end-effector returned by getEnd().JointPointerVector
getJoints()
Get all joints of this devicejava.lang.String
getName()
Returns the name of the devicePropertyMap
getPropertyMap()
Miscellaneous properties of the device.
The property map of the device is provided to let the user store
various settings for the device.Q
getQ(State state)
Q
getVelocityLimits()
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
setAccelerationLimits(Q acclimits)
void
setBounds(PairQ bounds)
void
setName(java.lang.String name)
Sets the name of the Devicevoid
setQ(Q q, State state)
The method is implemented via forwarding to the Device::setQ()
methods of the subdevices.void
setVelocityLimits(Q vellimits)
Transform3Dd
worldTbase(State state)
Calculates the homogeneous transform from world to base \robabx{w}{b}{\mathbf{T}}
-
-
-
Constructor Detail
-
CompositeDevicePtr
public CompositeDevicePtr(long cPtr, boolean cMemoryOwn)
-
CompositeDevicePtr
public CompositeDevicePtr()
Default constructor yielding a NULL-pointer.
-
CompositeDevicePtr
public CompositeDevicePtr(CompositeDevice ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(CompositeDevicePtr obj)
-
delete
public void delete()
-
deref
public CompositeDevice deref()
The pointer stored in the object.
-
__ref__
public CompositeDevice __ref__()
Dereferencing operator.
-
getDeref
public CompositeDevice getDeref()
Member access operator.
-
equals
public boolean equals(CompositeDevice 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
-
asDevicePtr
public DevicePtr asDevicePtr()
-
asDeviceCPtr
public DeviceCPtr asDeviceCPtr()
-
asJointDevicePtr
public JointDevicePtr asJointDevicePtr()
-
asJointDeviceCPtr
public JointDeviceCPtr asJointDeviceCPtr()
-
setQ
public void setQ(Q q, State state)
The method is implemented via forwarding to the Device::setQ()
methods of the subdevices.
-
baseJends
public Jacobian baseJends(State state)
like Device::baseJend() but with a Jacobian calculated for all
end-effectors (see getEnds()).
-
getEnds
public FrameVector getEnds()
The end-effectors of the composite device.
The end-effectors of the composite device are the end-effectors of
the devices from which the composite device was constructed.
This sequence of end-effectors may or may not include the default
end-effector returned by getEnd().
-
getJoints
public JointPointerVector getJoints()
Get all joints of this device- Returns:
- all joints
-
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)
-
baseJCframes
public JacobianCalculatorPtr baseJCframes(FrameVector frames, State state)
-
getBase
public Frame getBase()
-
getEnd
public Frame getEnd()
-
getName
public java.lang.String getName()
Returns the name of the device- Returns:
- name of the device
-
setName
public void setName(java.lang.String name)
Sets the name of the Device- Parameters:
name
- [in] the new name of the frame
-
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
-
getPropertyMap
public PropertyMap getPropertyMap()
Miscellaneous properties of the device.
The property map of the device is provided to let the user store
various settings for the device. The settings are typically loaded
from setup files.
The low-level manipulations of the property map can be cumbersome. To
ease these manipulations, the PropertyAccessor utility class has been
provided. Instances of this class are provided for a number of common
settings, however it is undecided if these properties are a public
part of RobWork.
- Returns:
- The property map of the device.
-
-