Package org.robwork.sdurw
Class JointDevice
- java.lang.Object
-
- org.robwork.sdurw.Device
-
- org.robwork.sdurw.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 Summary
Constructors Constructor Description JointDevice(long cPtr, boolean cMemoryOwn)
JointDevice(java.lang.String name, Frame base, Frame end, JointPointerVector joints, State state)
Construct the device for a sequence of joints.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JacobianCalculatorPtr
baseJCframes(FrameVector frames, State state)
Jacobian
baseJend(State state)
Calculates the jacobian matrix of the end-effector described
in the robot base frame ^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})
void
delete()
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(JointDevice obj)
long
getDOF()
Returns number of active jointsFrame
getEnd()
a method to return the frame of the end of the deviceJointPointerVector
getJoints()
Get all joints of this deviceQ
getQ(State state)
Gets configuration vector \mathbf{q}\in \mathbb{R}^n
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}
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
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}
-
Methods inherited from class org.robwork.sdurw.Device
baseJframe, baseJframes, baseTend, baseTframe, getCPtr, getName, getPropertyMap, setName, worldTbase
-
-
-
-
Constructor Detail
-
JointDevice
public JointDevice(long cPtr, boolean cMemoryOwn)
-
JointDevice
public JointDevice(java.lang.String name, Frame base, Frame end, JointPointerVector joints, State state)
Construct the device for a sequence of joints.- Parameters:
name
- [in] name of devicebase
- [in] the base of the deviceend
- [in] the end (or tool) of the devicejoints
- [in] the joints of the devicestate
- [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)
-
getJoints
public JointPointerVector 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
-
getQ
public Q getQ(State state)
Description copied from class:Device
Gets configuration vector \mathbf{q}\in \mathbb{R}^n
-
getDOF
public long getDOF()
Description copied from class:Device
Returns number of active joints
-
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
-
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
-
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 classDevice
- 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 classDevice
- Parameters:
vellimits
- [in] rw::math::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 classDevice
- 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 classDevice
- Parameters:
acclimits
- [in] the maximal acceleration
-
baseJend
public Jacobian baseJend(State state)
Description copied from class:Device
Calculates the jacobian matrix of the end-effector described
in the robot base frame ^{base}_{end}\mathbf{J}_{\mathbf{q}}(\mathbf{q})
- Overrides:
baseJend
in classDevice
- Parameters:
state
- [in] State for which to calculate the Jacobian
- Returns:
- the 6*ndof jacobian matrix:
{^{base}_{end}}\mathbf{J}_{\mathbf{q}}(\mathbf{q})
This method calculates the jacobian relating joint velocities ( \mathbf{\dot{q}} ) to the end-effector velocity seen from
base-frame ( \nu^{ase}_{end} )
\nu^{base}_{end} = {^{base}_{end}}\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}}
Where:
{^{base}_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \left[ \begin{array}{cccc} {^{base}_1}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) {^{base}_2}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \cdots {^b_n}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) \\ \end{array} \right]
where {^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) is defined by
{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \times {^{i}\mathbf{p}_n} \\ {^{base}}\mathbf{z}_i \\ \end{array} \right] \textrm{revolute joint} \end{array}
{^{base}_i}\mathbf{J}_{\mathbf{q}}(\mathbf{q}) = \begin{array}{cc} \left[ \begin{array}{c} {^{base}}\mathbf{z}_i \\ \mathbf{0} \\ \end{array} \right] \textrm{prismatic joint} \\ \end{array}
By default the method forwards to baseJframe().
-
baseJCframes
public JacobianCalculatorPtr baseJCframes(FrameVector frames, State state)
-
getBase
public Frame getBase()
Description copied from class:Device
a method to return the frame of the base of the device.
-
-