Package org.robwork.sdurw_invkin
Class IterativeIKPtr
- java.lang.Object
-
- org.robwork.sdurw_invkin.IterativeIKPtr
-
public class IterativeIKPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description IterativeIKPtr()
Default constructor yielding a NULL-pointer.IterativeIKPtr(long cPtr, boolean cMemoryOwn)
IterativeIKPtr(IterativeIK 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 IterativeIK
__ref__()
Dereferencing operator.IterativeIKCPtr
cptr()
void
delete()
IterativeIK
deref()
The pointer stored in the object.boolean
equals(IterativeIK p)
static long
getCPtr(IterativeIKPtr obj)
IterativeIK
getDeref()
Member access operator.double
getMaxError()
Returns the maximal error for a solution
int
getMaxIterations()
Returns the maximal number of iterationsPropertyMap
getProperties()
Returns the PropertyMapFrameCPtr
getTCP()
Returns the Tool Center Point (TCP) used when solving the IK problem.
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipIterativeIKPtr
makeDefault(DevicePtr device, State state)
Default iterative inverse kinematics solver for a device and
state.
void
setCheckJointLimits(boolean check)
Specifies whether to check joint limits before returning a solution.
void
setMaxError(double maxError)
Sets the maximal error for a solution
The error between two transformations is defined as the maximum of infinite-norm
of the positional error and the angular error encoded as EAA.
void
setMaxIterations(int maxIterations)
Sets the maximal number of iterations allowed
VectorQ
solve(Transform3D baseTend, State state)
Calculates the inverse kinematics
Given a desired \robabx{}{desired}{\mathbf{T}}
and the current state, the method solves the inverse kinematics
problem.
If the algorithm is able to identify multiple solutions (e.g.
-
-
-
Constructor Detail
-
IterativeIKPtr
public IterativeIKPtr(long cPtr, boolean cMemoryOwn)
-
IterativeIKPtr
public IterativeIKPtr()
Default constructor yielding a NULL-pointer.
-
IterativeIKPtr
public IterativeIKPtr(IterativeIK ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(IterativeIKPtr obj)
-
delete
public void delete()
-
deref
public IterativeIK deref()
The pointer stored in the object.
-
__ref__
public IterativeIK __ref__()
Dereferencing operator.
-
getDeref
public IterativeIK getDeref()
Member access operator.
-
equals
public boolean equals(IterativeIK 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 IterativeIKCPtr cptr()
-
setMaxError
public void setMaxError(double maxError)
Sets the maximal error for a solution
The error between two transformations is defined as the maximum of infinite-norm
of the positional error and the angular error encoded as EAA.
- Parameters:
maxError
- [in] the maxError. It will be assumed that maxError > 0
-
getMaxError
public double getMaxError()
Returns the maximal error for a solution
- Returns:
- Maximal error
-
setMaxIterations
public void setMaxIterations(int maxIterations)
Sets the maximal number of iterations allowed
- Parameters:
maxIterations
- [in] maximal number of iterations
-
getMaxIterations
public int getMaxIterations()
Returns the maximal number of iterations
-
getProperties
public PropertyMap getProperties()
Returns the PropertyMap- Returns:
- Reference to the PropertyMap
-
makeDefault
public IterativeIKPtr makeDefault(DevicePtr device, State state)
Default iterative inverse kinematics solver for a device and
state.
- Parameters:
device
- [in] Device for which to solve IK.state
- [in] Fixed state for which IK is solved.
-
solve
public VectorQ solve(Transform3D baseTend, State state)
Calculates the inverse kinematics
Given a desired \robabx{}{desired}{\mathbf{T}}
and the current state, the method solves the inverse kinematics
problem.
If the algorithm is able to identify multiple solutions (e.g. elbow
up and down) it will return all of these. Before returning a solution,
they may be checked to be within the bounds of the configuration space.
(See setCheckJointLimits(bool) )
- Parameters:
baseTend
- [in] Desired base to end transformation \robabx{}{desired}{\mathbf{T}}
state
- [in] State of the device from which to start the
iterations
- Returns:
- List of solutions. Notice that the list may be empty.
Note: The targets baseTend must be defined relative to the base of the
robot/device.
-
setCheckJointLimits
public void setCheckJointLimits(boolean check)
Specifies whether to check joint limits before returning a solution.
- Parameters:
check
- [in] If true the method should perform a check that joints are within
bounds.
-
getTCP
public FrameCPtr getTCP()
Returns the Tool Center Point (TCP) used when solving the IK problem.
- Returns:
- The TCP Frame used when solving the IK.
-
-