Package org.robwork.sdurw
Class UniversalJointPtr
- java.lang.Object
-
- org.robwork.sdurw.UniversalJointPtr
-
public class UniversalJointPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description UniversalJointPtr()Default constructor yielding a NULL-pointer.UniversalJointPtr(long cPtr, boolean cMemoryOwn)UniversalJointPtr(UniversalJoint 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 UniversalJoint__ref__()Dereferencing operator.voidattachTo(Frame parent, State state)Move a frame within the tree.
The frame frame is detached from its parent and reattached to
parent.voiddelete()UniversalJointderef()The pointer stored in the object.Transform3DddoGetTransform(State state)Frame::doGetTransformvoiddoMultiplyTransform(Transform3Dd parent, State state, Transform3Dd result)Frame::doMultiplyTransformbooleanequals(UniversalJoint p)Transform3DdfTf(Frame to, State state)Get the transform of other frame relative to this frame.PairQgetBounds()Gets joint boundsStateCachePtrgetCache(State state)Get the cache.SWIGTYPE_p_rw__core__iter_pairT_rw__common__ConcatVectorIteratorT_rw__kinematics__Frame_t_tgetChildren()SWIGTYPE_p_rw__core__iter_pairT_rw__common__ConstConcatVectorIteratorT_rw__kinematics__Frame_t_tgetChildren(State state)Iterator pair for all children of the frame.SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__kinematics__Frame_t_tgetChildrenList(State state)get a list of all frame childrenstatic longgetCPtr(UniversalJointPtr obj)SWIGTYPE_p_rw__core__iter_pairT_rw__common__ConcatVectorIteratorT_rw__kinematics__Frame_t_tgetDafChildren(State state)FramegetDafParent(State state)StateCachePtrgetDefaultCache()Get default cache.UniversalJointgetDeref()Member access operator.intgetDOF()The number of degrees of freedom (dof) of the frame.
The dof is the number of joint values that are used for controlling
the frame.
Given a set joint values of type State, the getDof() number of joint
values for the frame can be read and written with State::getQ() and
State::setQ().
Transform3DdgetFixedTransform()intgetID()An integer ID for the StateData.
IDs are assigned to the state data upon insertion State.
StateData that are not in a State have an ID of -1.
StateData present in different trees may have identical IDs.
IDs are used for the efficient implementation of State.voidgetJacobian(long row, long col, Transform3Dd joint, Transform3Dd tcp, State state, Jacobian jacobian)Transform3DdgetJointTransform(State state)QgetMaxAcceleration()Gets max acceleration of jointQgetMaxVelocity()Gets max velocity of jointjava.lang.StringgetName()The name of the state data.
FramegetParent()The parent of the frame or NULL if the frame is a DAF.FramegetParent(State state)Returns the parent of the frame
If no static parent exists it look for at DAF parent.PropertyMapgetPropertyMap()StateStructuregetStateStructure()Get the state structure.Transform3DdgetTransform(State state)The transform of the frame relative to its parent.
The transform is calculated for the joint values of state.
The exact implementation of getTransform() depends on the type of
frame.booleanhasCache()Check is state data includes a cache.booleanisActive()a joint is active if its motorized/controlled in some
fasion.booleanisDAF()Test if this frame is a Dynamically Attachable FramebooleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipvoidmultiplyTransform(Transform3Dd parent, State state, Transform3Dd result)Post-multiply the transform of the frame to the parent transform.
The transform is calculated for the joint values of state.
The exact implementation of getTransform() depends on the type of
frame.voidremoveJointMapping()voidsetActive(boolean isActive)set the active state of the jointvoidsetBounds(SWIGTYPE_p_std__pairT_rw__math__Q_const_rw__math__Q_const_t bounds)Sets joint boundsvoidsetCache(StateCachePtr cache, State state)Set the cache values.voidsetFixedTransform(Transform3Dd t3d)voidsetJointMapping(SWIGTYPE_p_rw__core__PtrT_rw__math__Function1DiffT_double_double_double_t_t function)voidsetMaxAcceleration(Q maxAcceleration)Sets max acceleration of jointvoidsetMaxVelocity(Q maxVelocity)Sets max velocity of jointintsize()The number of doubles allocated by this StateData in
each State object.
Transform3DdwTf(State state)Get the transform relative to world.
-
-
-
Constructor Detail
-
UniversalJointPtr
public UniversalJointPtr(long cPtr, boolean cMemoryOwn)
-
UniversalJointPtr
public UniversalJointPtr()
Default constructor yielding a NULL-pointer.
-
UniversalJointPtr
public UniversalJointPtr(UniversalJoint ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(UniversalJointPtr obj)
-
delete
public void delete()
-
deref
public UniversalJoint deref()
The pointer stored in the object.
-
__ref__
public UniversalJoint __ref__()
Dereferencing operator.
-
getDeref
public UniversalJoint getDeref()
Member access operator.
-
equals
public boolean equals(UniversalJoint 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
-
doMultiplyTransform
public void doMultiplyTransform(Transform3Dd parent, State state, Transform3Dd result)
Frame::doMultiplyTransform
-
doGetTransform
public Transform3Dd doGetTransform(State state)
Frame::doGetTransform
-
getJacobian
public void getJacobian(long row, long col, Transform3Dd joint, Transform3Dd tcp, State state, Jacobian jacobian)
-
getFixedTransform
public Transform3Dd getFixedTransform()
-
setFixedTransform
public void setFixedTransform(Transform3Dd t3d)
-
getJointTransform
public Transform3Dd getJointTransform(State state)
-
setJointMapping
public void setJointMapping(SWIGTYPE_p_rw__core__PtrT_rw__math__Function1DiffT_double_double_double_t_t function)
-
removeJointMapping
public void removeJointMapping()
-
setBounds
public void setBounds(SWIGTYPE_p_std__pairT_rw__math__Q_const_rw__math__Q_const_t bounds)
Sets joint bounds- Parameters:
bounds- [in] the lower and upper bounds of this joint
-
getBounds
public PairQ getBounds()
Gets joint bounds- Returns:
- the lower and upper bound of this joint
-
setMaxVelocity
public void setMaxVelocity(Q maxVelocity)
Sets max velocity of joint- Parameters:
maxVelocity- [in] the new maximum velocity of the joint
-
getMaxVelocity
public Q getMaxVelocity()
Gets max velocity of joint- Returns:
- the maximum velocity of the joint
-
setMaxAcceleration
public void setMaxAcceleration(Q maxAcceleration)
Sets max acceleration of joint- Parameters:
maxAcceleration- [in] the new maximum acceleration of the joint
-
getMaxAcceleration
public Q getMaxAcceleration()
Gets max acceleration of joint- Returns:
- the maximum acceleration of the joint
-
setActive
public void setActive(boolean isActive)
set the active state of the joint- Parameters:
isActive- [in] true to enable control/motorization of joint, false otherwise
-
isActive
public boolean isActive()
a joint is active if its motorized/controlled in some
fasion. passive or non-active joints are typically used in parrallel robots.- Returns:
-
multiplyTransform
public void multiplyTransform(Transform3Dd parent, State state, Transform3Dd result)
Post-multiply the transform of the frame to the parent transform.
The transform is calculated for the joint values of state.
The exact implementation of getTransform() depends on the type of
frame. See for example RevoluteJoint and PrismaticJoint.
- Parameters:
parent- [in] The world transform of the parent frame.state- [in] Joint values for the forward kinematics tree.result- [in] The transform of the frame in the world frame.
-
getTransform
public Transform3Dd getTransform(State state)
The transform of the frame relative to its parent.
The transform is calculated for the joint values of state.
The exact implementation of getTransform() depends on the type of
frame. See for example RevoluteJoint and PrismaticJoint.
- Parameters:
state- [in] Joint values for the forward kinematics tree.
- Returns:
- The transform of the frame relative to its parent.
-
getPropertyMap
public PropertyMap getPropertyMap()
-
getDOF
public int getDOF()
The number of degrees of freedom (dof) of the frame.
The dof is the number of joint values that are used for controlling
the frame.
Given a set joint values of type State, the getDof() number of joint
values for the frame can be read and written with State::getQ() and
State::setQ().
- Returns:
- The number of degrees of freedom of the frame.
-
getParent
public Frame getParent()
The parent of the frame or NULL if the frame is a DAF.
-
getParent
public Frame getParent(State state)
Returns the parent of the frame
If no static parent exists it look for at DAF parent. If such
does not exists either it returns NULL.
- Parameters:
state- [in] the state to consider- Returns:
- the parent
-
getChildren
public SWIGTYPE_p_rw__core__iter_pairT_rw__common__ConcatVectorIteratorT_rw__kinematics__Frame_t_t getChildren()
-
getChildren
public SWIGTYPE_p_rw__core__iter_pairT_rw__common__ConstConcatVectorIteratorT_rw__kinematics__Frame_t_t getChildren(State state)
Iterator pair for all children of the frame.
-
getChildrenList
public SWIGTYPE_p_std__vectorT_rw__core__PtrT_rw__kinematics__Frame_t_t getChildrenList(State state)
get a list of all frame children- Parameters:
state- [in] the state of to look for children in.- Returns:
- a vector with the children
-
getDafChildren
public SWIGTYPE_p_rw__core__iter_pairT_rw__common__ConcatVectorIteratorT_rw__kinematics__Frame_t_t getDafChildren(State state)
-
attachTo
public void attachTo(Frame parent, State state)
Move a frame within the tree.
The frame frame is detached from its parent and reattached to
parent. The frames frame and parent must both belong to the
same kinematics tree.
Only frames with no static parent (see getParent()) can be moved.
- Parameters:
parent- [in] The frame to attach frame to.state- [inout] The state to which the attachment is written.
-
isDAF
public boolean isDAF()
Test if this frame is a Dynamically Attachable Frame- Returns:
- true if this frame is a DAF, false otherwise
-
wTf
public Transform3Dd wTf(State state)
Get the transform relative to world.- Parameters:
state- [in] the state.- Returns:
- transform relative to world.
-
fTf
public Transform3Dd fTf(Frame to, State state)
Get the transform of other frame relative to this frame.- Parameters:
to- [in] the other framestate- [in] the state.- Returns:
- transform of frame to relative to this frame.
-
getID
public int getID()
An integer ID for the StateData.
IDs are assigned to the state data upon insertion State.
StateData that are not in a State have an ID of -1.
StateData present in different trees may have identical IDs.
IDs are used for the efficient implementation of State. Normally,
you should not make use of StateData IDs yourself.
- Returns:
- An integer ID for the frame.
-
getName
public java.lang.String getName()
The name of the state data.
- Returns:
- The name of the state data.
-
size
public int size()
The number of doubles allocated by this StateData in
each State object.
- Returns:
- The number of doubles allocated by the StateData
-
hasCache
public boolean hasCache()
Check is state data includes a cache.- Returns:
- true if cache, false otherwise.
-
getCache
public StateCachePtr getCache(State state)
Get the cache.- Parameters:
state- [in] the state.- Returns:
- the cache.
-
getDefaultCache
public StateCachePtr getDefaultCache()
Get default cache.- Returns:
- the cache.
-
setCache
public void setCache(StateCachePtr cache, State state)
Set the cache values.- Parameters:
cache- [in] the cache.state- [in/out] state updated with new cache.
-
getStateStructure
public StateStructure getStateStructure()
Get the state structure.- Returns:
- the state structure.
-
-