Package org.robwork.sdurw_pathplanning
Class QIKSamplerPtr
- java.lang.Object
-
- org.robwork.sdurw_pathplanning.QIKSamplerPtr
-
public class QIKSamplerPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description QIKSamplerPtr()
Default constructor yielding a NULL-pointer.QIKSamplerPtr(long cPtr, boolean cMemoryOwn)
QIKSamplerPtr(QIKSampler 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 QIKSampler
__ref__()
Dereferencing operator.QIKSamplerCPtr
cptr()
void
delete()
QIKSampler
deref()
The pointer stored in the object.boolean
empty()
True if the sampler is known to contain no more
configurations.boolean
equals(QIKSampler p)
static long
getCPtr(QIKSamplerPtr obj)
QIKSampler
getDeref()
Member access operator.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipQIKSamplerPtr
make(DevicePtr device, State state)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
QIKSamplerPtr
make(DevicePtr device, State state, SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t solver)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
QIKSamplerPtr
make(DevicePtr device, State state, SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t solver, QSamplerPtr seed)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
QIKSamplerPtr
make(DevicePtr device, State state, SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t solver, QSamplerPtr seed, int maxAttempts)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
QIKSamplerPtr
makeConstrained(QIKSamplerPtr sampler, QConstraintPtr constraint)
An IK sampler filtered by a constraint.
For each call of sample() up to maxAttempts configurations are
extracted from sampler and checked by constraint.QIKSamplerPtr
makeConstrained(QIKSamplerPtr sampler, QConstraintPtr constraint, int maxAttempts)
An IK sampler filtered by a constraint.
For each call of sample() up to maxAttempts configurations are
extracted from sampler and checked by constraint.Q
sample(Transform3D target)
Sample a configuration that solves an IK problem for
target.
If sampling fails, the sampler may return the empty configuration.
-
-
-
Constructor Detail
-
QIKSamplerPtr
public QIKSamplerPtr(long cPtr, boolean cMemoryOwn)
-
QIKSamplerPtr
public QIKSamplerPtr()
Default constructor yielding a NULL-pointer.
-
QIKSamplerPtr
public QIKSamplerPtr(QIKSampler ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(QIKSamplerPtr obj)
-
delete
public void delete()
-
deref
public QIKSampler deref()
The pointer stored in the object.
-
__ref__
public QIKSampler __ref__()
Dereferencing operator.
-
getDeref
public QIKSampler getDeref()
Member access operator.
-
equals
public boolean equals(QIKSampler 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 QIKSamplerCPtr cptr()
-
sample
public Q sample(Transform3D target)
Sample a configuration that solves an IK problem for
target.
If sampling fails, the sampler may return the empty configuration. If
empty() is true then the sampler has no more configurations.
Otherwise sample() may (or may not) succeed if called a second time.
-
empty
public boolean empty()
True if the sampler is known to contain no more
configurations.
-
make
public QIKSamplerPtr make(DevicePtr device, State state, SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t solver, QSamplerPtr seed, int maxAttempts)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
- Parameters:
device
- [in] The device for which seeds are sampled.
state
- [in] Fixed state with respect to which IK is solved.
solver
- [in] Optional IK solver for device and state.
seed
- [in] Optional sampler of seeds to feed the IK solver.
maxAttempts
- [in] Optional number of seeds to feed the IK
solver. If maxAttempts is negative, a default value for
maxAttempts is chosen.
-
make
public QIKSamplerPtr make(DevicePtr device, State state, SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t solver, QSamplerPtr seed)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
- Parameters:
device
- [in] The device for which seeds are sampled.
state
- [in] Fixed state with respect to which IK is solved.
solver
- [in] Optional IK solver for device and state.
seed
- [in] Optional sampler of seeds to feed the IK solver.
-
make
public QIKSamplerPtr make(DevicePtr device, State state, SWIGTYPE_p_rw__core__PtrT_rw__invkin__IterativeIK_t solver)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
- Parameters:
device
- [in] The device for which seeds are sampled.
state
- [in] Fixed state with respect to which IK is solved.
solver
- [in] Optional IK solver for device and state.
-
make
public QIKSamplerPtr make(DevicePtr device, State state)
An IK sampler based on an iterative IK solver.
All solutions returned are checked to be within the bounds of the device.
- Parameters:
device
- [in] The device for which seeds are sampled.
state
- [in] Fixed state with respect to which IK is solved.
-
makeConstrained
public QIKSamplerPtr makeConstrained(QIKSamplerPtr sampler, QConstraintPtr constraint, int maxAttempts)
An IK sampler filtered by a constraint.
For each call of sample() up to maxAttempts configurations are
extracted from sampler and checked by constraint. The first
sample that satisfies the constraint is returned; if no such were
found the empty configuration is returned.
If maxAttempts is negative, then sampler is sampled forever
until either the sampler is empty or a configuration satisfying
constraint is found.
-
makeConstrained
public QIKSamplerPtr makeConstrained(QIKSamplerPtr sampler, QConstraintPtr constraint)
An IK sampler filtered by a constraint.
For each call of sample() up to maxAttempts configurations are
extracted from sampler and checked by constraint. The first
sample that satisfies the constraint is returned; if no such were
found the empty configuration is returned.
If maxAttempts is negative, then sampler is sampled forever
until either the sampler is empty or a configuration satisfying
constraint is found.
-
-