Package org.robwork.sdurw_models
Class ParallelDevice
- java.lang.Object
-
- org.robwork.sdurw_kinematics.Stateless
-
- org.robwork.sdurw_models.Device
-
- org.robwork.sdurw_models.JointDevice
-
- org.robwork.sdurw_models.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, FramePtr base, FramePtr end, VectorJoint_p joints, State state, VectorParallelDeviceLeg junctions)
Constructor for parallel device with multiple junctions.ParallelDevice(VectorParallelLeg_p 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)
Jacobian
baseJframe(FramePtr frame, State state)
void
delete()
VectorJoint_p
getActiveJoints()
The active joints of the parallel device.PairQ
getAllBounds()
Get bounds for all joints (includes both active and passive joints).VectorJoint_p
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.VectorParallelDeviceLeg
getJunctions()
Get the junctions of the device.VectorParallelLeg_p
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, vector_b 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_models.JointDevice
baseJCframes, getAccelerationLimits, getBase, getBounds, getCPtr, getDOF, getEnd, getJoints, getQ, getVelocityLimits, setAccelerationLimits, setBounds, setVelocityLimits
-
Methods inherited from class org.robwork.sdurw_models.Device
baseJCend, baseJCframe, baseJframe, baseJframes, baseTend, baseTframe, getCPtr, getName, getPropertyMap, setName, toString, worldTbase
-
Methods inherited from class org.robwork.sdurw_kinematics.Stateless
getCPtr, getStateStructure, isRegistered, registerIn, registerIn, unregister
-
-
-
-
Constructor Detail
-
ParallelDevice
public ParallelDevice(long cPtr, boolean cMemoryOwn)
-
ParallelDevice
public ParallelDevice(VectorParallelLeg_p 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, FramePtr base, FramePtr end, VectorJoint_p joints, State state, VectorParallelDeviceLeg 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, vector_b 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.
-
baseJend
public Jacobian baseJend(State state)
- Overrides:
baseJend
in classJointDevice
-
getLegs
public VectorParallelLeg_p getLegs()
The legs of the parallel device.
-
getJunctions
public VectorParallelDeviceLeg getJunctions()
Get the junctions of the device.- Returns:
- a vector of junctions. Each junction is given by a two or more legs.
-
getActiveJoints
public VectorJoint_p getActiveJoints()
The active joints of the parallel device.
-
getAllJoints
public VectorJoint_p 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.
-
-