Package org.robwork.sdurw_models
Class DevicePtr
- java.lang.Object
-
- org.robwork.sdurw_models.DevicePtr
-
public class DevicePtr 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 Device
__ref__()
Dereferencing operator.JacobianCalculatorPtr
baseJCend(State state)
DeviceJacobian for the end frame.
By default this method forwards to baseDJframe().JacobianCalculatorPtr
baseJCframe(FrameCPtr frame, State state)
DeviceJacobian for a particular frame.
By default this method forwards to baseDJframes().JacobianCalculatorPtr
baseJCframes(FrameVector frames, State state)
DeviceJacobian for a sequence of frames.Jacobian
baseJend(State state)
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})
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.Transform3D
baseTend(State state)
Calculates the homogeneous transform from base to the end frame
\robabx{base}{end}{\mathbf{T}}Transform3D
baseTframe(FrameCPtr f, State state)
Calculates the homogeneous transform from base to a frame f
\robabx{b}{f}{\mathbf{T}}DeviceCPtr
cptr()
void
delete()
Device
deref()
The pointer stored in the object.boolean
equals(Device p)
Q
getAccelerationLimits()
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}
Frame
getBase()
a method to return the frame of the base of the device.PairQ
getBounds()
Returns the upper \mathbf{q}_{min} \in \mathbb{R}^n and
lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space
static long
getCPtr(DevicePtr obj)
Device
getDeref()
Member access operator.long
getDOF()
Returns number of active jointsFrame
getEnd()
a method to return the frame of the end of the devicejava.lang.String
getName()
Returns the name of the devicePropertyMap
getPropertyMap()
Q
getQ(State state)
Gets configuration vector \mathbf{q}\in \mathbb{R}^n
StateStructurePtr
getStateStructure()
Get the state structure.Q
getVelocityLimits()
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}
boolean
isNull()
checks if the pointer is nullboolean
isRegistered()
Check if object has registered its state.boolean
isShared()
check if this Ptr has shared ownership or none
ownershipvoid
registerIn(State state)
initialize this stateless data to a specific statevoid
registerIn(StateStructurePtr state)
register this stateless object in a statestructure.void
setAccelerationLimits(Q acclimits)
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}
void
setBounds(PairQ bounds)
Sets the upper \mathbf{q}_{min} \in \mathbb{R}^n and
lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space
void
setName(java.lang.String name)
Sets the name of the Devicevoid
setQ(Q q, State state)
Sets configuration vector \mathbf{q} \in \mathbb{R}^n
void
setVelocityLimits(Q vellimits)
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}
java.lang.String
toString()
void
unregister()
unregisters all state data of this stateless objectTransform3D
worldTbase(State state)
Calculates the homogeneous transform from world to base \robabx{w}{b}{\mathbf{T}}
-
-
-
Constructor Detail
-
DevicePtr
public DevicePtr(long cPtr, boolean cMemoryOwn)
-
DevicePtr
public DevicePtr()
Default constructor yielding a NULL-pointer.
-
DevicePtr
public DevicePtr(Device ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DevicePtr obj)
-
delete
public void delete()
-
deref
public Device deref()
The pointer stored in the object.
-
__ref__
public Device __ref__()
Dereferencing operator.
-
getDeref
public Device getDeref()
Member access operator.
-
equals
public boolean equals(Device 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
-
cptr
public DeviceCPtr cptr()
-
setQ
public void setQ(Q q, State state)
Sets configuration vector \mathbf{q} \in \mathbb{R}^n
- Parameters:
q
- [in] configuration vector \mathbf{q}state
- [in] state into which to set \mathbf{q}
-
getQ
public Q getQ(State state)
Gets configuration vector \mathbf{q}\in \mathbb{R}^n
- Parameters:
state
- [in] state from which which to get \mathbf{q}- Returns:
- configuration vector \mathbf{q}
-
getBounds
public PairQ getBounds()
Returns the upper \mathbf{q}_{min} \in \mathbb{R}^n and
lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space
- Returns:
- std::pair containing (\mathbf{q}_{min}, \mathbf{q}_{max})
-
setBounds
public void setBounds(PairQ bounds)
Sets the upper \mathbf{q}_{min} \in \mathbb{R}^n and
lower \mathbf{q}_{max} \in \mathbb{R}^n bounds of the joint space
- Parameters:
bounds
- [in] std::pair containing
(\mathbf{q}_{min}, \mathbf{q}_{max})
-
getVelocityLimits
public Q getVelocityLimits()
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}
- Returns:
- the maximal velocity
-
setVelocityLimits
public void setVelocityLimits(Q vellimits)
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}
- Parameters:
vellimits
- [in] Q with the maximal velocity
-
getAccelerationLimits
public Q getAccelerationLimits()
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}
- Returns:
- the maximal acceleration
-
setAccelerationLimits
public void setAccelerationLimits(Q acclimits)
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}
- Parameters:
acclimits
- [in] the maximal acceleration
-
getDOF
public long getDOF()
Returns number of active joints- Returns:
- number of active joints n
-
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
-
getBase
public Frame getBase()
a method to return the frame of the base of the device.- Returns:
- the base frame
-
getEnd
public Frame getEnd()
a method to return the frame of the end of the device- Returns:
- the end frame
-
baseTframe
public Transform3D baseTframe(FrameCPtr 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 Transform3D 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 Transform3D 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(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})
- 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
-
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().
-
baseJCframes
public JacobianCalculatorPtr baseJCframes(FrameVector frames, State state)
DeviceJacobian for a sequence of frames.
-
getPropertyMap
public PropertyMap getPropertyMap()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
registerIn
public void registerIn(State state)
initialize this stateless data to a specific state- Parameters:
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.- Returns:
- the state structure.
-
isRegistered
public boolean isRegistered()
Check if object has registered its state.- Returns:
- true if registered, false otherwise.
-
-