Package org.robwork.sdurw
Class ParallelDevice
- java.lang.Object
-
- org.robwork.sdurw.Device
-
- org.robwork.sdurw.JointDevice
-
- org.robwork.sdurw.ParallelDevice
-
public class ParallelDevice extends JointDevice
This class defines the interface for Parallel devices.
-
-
Constructor Summary
Constructors Constructor Description ParallelDevice(long cPtr, boolean cMemoryOwn)
ParallelDevice(java.lang.String name, Frame base, Frame end, JointPointerVector joints, State state, ParallelLegPointerVectorVector junctions)
Constructor for parallel device with multiple junctions.ParallelDevice(ParallelLegPointerVector legs, java.lang.String name, State state)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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})
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})
void
delete()
JointPointerVector
getActiveJoints()
The active joints of the parallel device.PairQ
getAllBounds()
Get bounds for all joints (includes both active and passive joints).JointPointerVector
getAllJoints()
Get all joints (both active and passive).static long
getCPtr(ParallelDevice obj)
long
getFullDOF()
Get the total degrees of freedom for all (active and passive) joints in the
device.Q
getFullQ(State state)
Get the full configuration vector of the device.ParallelLegPointerVectorVector
getJunctions()
Get the junctions of the device.ParallelLegPointerVector
getLegs()
The legs of the parallel device.void
setFullQ(Q q, State state)
Set the full configuration of the device.
This sets the joint values directly, and there is no checks or guarantees that the device
will be in a valid connected configuration afterwards.void
setQ(Q q, Vectorbool enabled, State state)
Set only some of the actuated joints.
This version of setQ will only set a subset of the actuated joints.
Based on the value of
q, the function will compute the values for the
unactuated (passive) joints, and the remaining actuated joints.
This is mainly useful for parallel devices that have more controlled joints
than strictly required to make the kinematics determined.
void
setQ(Q q, State state)
The configuration q is the configuration for the actuated joints
of the parallel device.-
Methods inherited from class org.robwork.sdurw.JointDevice
baseJCframes, getAccelerationLimits, getBase, getBounds, getCPtr, getDOF, getEnd, getJoints, getQ, getVelocityLimits, setAccelerationLimits, setBounds, setVelocityLimits
-
Methods inherited from class org.robwork.sdurw.Device
baseJframes, baseTend, baseTframe, getCPtr, getName, getPropertyMap, setName, worldTbase
-
-
-
-
Constructor Detail
-
ParallelDevice
public ParallelDevice(long cPtr, boolean cMemoryOwn)
-
ParallelDevice
public ParallelDevice(ParallelLegPointerVector legs, java.lang.String name, State state)
Constructor
- Parameters:
legs
- [in] the serial legs connecting the endplate to the base.
The base of each serial Leg must be the same frame. Likewise, the endeffector
(last frame) of each Leg must transform to the same transform as each of the
other legsname
- [in] name of devicestate
- [in] the state for the assembly mode
-
ParallelDevice
public ParallelDevice(java.lang.String name, Frame base, Frame end, JointPointerVector joints, State state, ParallelLegPointerVectorVector junctions)
Constructor for parallel device with multiple junctions.- Parameters:
name
- [in] name of the device.base
- [in] the base frame.end
- [in] the end frame.joints
- [in] a list of joints. Each joint can be included in multiple legs.state
- [in] the state used to construct a JointDevice.junctions
- [in] a list of junctions.
Each junction is given by a list of legs that must begin and end in the same frame.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ParallelDevice obj)
-
delete
public void delete()
- Overrides:
delete
in classJointDevice
-
setQ
public void setQ(Q q, State state)
The configuration q is the configuration for the actuated joints
of the parallel device. Based on the value of q the setQ() method
automatically computes the values for the unactuated (passive)
joints.- Overrides:
setQ
in classJointDevice
- Parameters:
q
- [in] configuration vector \mathbf{q}state
- [in] state into which to set \mathbf{q}
-
setQ
public void setQ(Q q, Vectorbool enabled, State state)
Set only some of the actuated joints.
This version of setQ will only set a subset of the actuated joints.
Based on the value of
q, the function will compute the values for the
unactuated (passive) joints, and the remaining actuated joints.
This is mainly useful for parallel devices that have more controlled joints
than strictly required to make the kinematics determined.
- Parameters:
q
- [in] the configuration of the actuated joints
(the only considered elements are the ones where the corresponding elements of enabled
is true).enabled
- [in] vector of same size as q, specifying which values to solve for.state
- [in/out] the state with all active and passive joint values.
The input state is expected to contain a valid and consistent configuration of the
device.
-
baseJframe
public Jacobian baseJframe(Frame frame, State state)
Description copied from class:Device
Calculates the jacobian matrix of a frame f described in the
robot base frame ^{base}_{frame}\mathbf{J}_{\mathbf{q}}(\mathbf{q})
- Overrides:
baseJframe
in classDevice
- 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().
-
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 classJointDevice
- 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().
-
getLegs
public ParallelLegPointerVector getLegs()
The legs of the parallel device.
-
getJunctions
public ParallelLegPointerVectorVector getJunctions()
Get the junctions of the device.- Returns:
- a vector of junctions. Each junction is given by a two or more legs.
-
getActiveJoints
public JointPointerVector getActiveJoints()
The active joints of the parallel device.
-
getAllJoints
public JointPointerVector getAllJoints()
Get all joints (both active and passive).- Returns:
- a vector of all the joints.
-
getFullDOF
public long getFullDOF()
Get the total degrees of freedom for all (active and passive) joints in the
device.- Returns:
- the total degrees of freedom.
-
getAllBounds
public PairQ getAllBounds()
Get bounds for all joints (includes both active and passive joints).- Returns:
- a pair with the lower and upper limits.
-
getFullQ
public Q getFullQ(State state)
Get the full configuration vector of the device. This gives the complete state of
the parallel device.- Parameters:
state
- [in] the state that contains the full configuration.- Returns:
- the configuration vector with the joint values for both active and passive
joints.
-
setFullQ
public void setFullQ(Q q, State state)
Set the full configuration of the device.
This sets the joint values directly, and there is no checks or guarantees that the device
will be in a valid connected configuration afterwards.- Parameters:
q
- [in] the configuration vector to set.state
- [in/out] the state to update with a new configuration.
-
-