Class ClearanceOptimizerPtr
- java.lang.Object
-
- org.robwork.sdurw_pathoptimization.ClearanceOptimizerPtr
-
public class ClearanceOptimizerPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description ClearanceOptimizerPtr()
Default constructor yielding a NULL-pointer.ClearanceOptimizerPtr(long cPtr, boolean cMemoryOwn)
ClearanceOptimizerPtr(ClearanceOptimizer 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 ClearanceOptimizer
__ref__()
Dereferencing operator.ClearanceOptimizerCPtr
cptr()
void
delete()
ClearanceOptimizer
deref()
The pointer stored in the object.boolean
equals(ClearanceOptimizer p)
ClearanceCalculatorCPtr
getClearanceCalculator()
Returns the ClearanceCalculator associated with the optimizer.
static long
getCPtr(ClearanceOptimizerPtr obj)
ClearanceOptimizer
getDeref()
Member access operator.double
getMinimumClearance()
Returns the minimum clearance optimized for.java.lang.String
getPROP_LOOPCOUNT()
Property key for the maximal number of loops.java.lang.String
getPROP_MAXTIME()
Property key for max time.java.lang.String
getPROP_STEPSIZE()
Property key for step sizePropertyMap
getPropertyMap()
Returns the PropertyMap associated with the optimizer.
The PropertyMap defines the following parameters used by the optimizer:
Property Name | Type | Default value
---------------------------------- | ------ | -------------
ClearanceOptimizer::PROP_LOOPCOUNT | int | 20
ClearanceOptimizer::PROP_MAXTIME | double | 200
ClearanceOptimizer::PROP_STEPSIZE | double | 0.1
boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipSWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t
optimize(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path)
Runs optimization algorithm
Runs the optimization algorithm using the parameters specified in the property map
SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t
optimize(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path, double stepsize, long maxcount, double maxtime)
Runs optimization algorithm
Calling this method runs the path optimization algorithm.void
setMinimumClearance(double dist)
Sets the minimum clearance optimized for.
Points on the path with clearance greater than _minClearance are not optimized
further.void
setQConstraint(QConstraintCPtr qConstraint)
Set a configuration constraint in the clearance optimizer.
The optimizer will not generate a path with configurations that is in collision according
to the constraint.
void
setStateConstraint(StateConstraintCPtr stateConstraint)
Set a state constraint in the clearance optimizer.
The optimizer will not generate a path with configurations that is in collision according
to the state constraint.
-
-
-
Constructor Detail
-
ClearanceOptimizerPtr
public ClearanceOptimizerPtr(long cPtr, boolean cMemoryOwn)
-
ClearanceOptimizerPtr
public ClearanceOptimizerPtr()
Default constructor yielding a NULL-pointer.
-
ClearanceOptimizerPtr
public ClearanceOptimizerPtr(ClearanceOptimizer ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(ClearanceOptimizerPtr obj)
-
delete
public void delete()
-
deref
public ClearanceOptimizer deref()
The pointer stored in the object.
-
__ref__
public ClearanceOptimizer __ref__()
Dereferencing operator.
-
getDeref
public ClearanceOptimizer getDeref()
Member access operator.
-
equals
public boolean equals(ClearanceOptimizer 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 ClearanceOptimizerCPtr cptr()
-
optimize
public SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t optimize(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path, double stepsize, long maxcount, double maxtime)
Runs optimization algorithm
Calling this method runs the path optimization algorithm. This call blocks until the
optimized path is ready. This may take quite a while, depending on the maxcount
specified and the amount of geometry in the scene.
- Parameters:
path
- [in] Path to optimizestepsize
- [in] Maximum size between configurations in the dense pathmaxcount
- [in] Number of time to attempt optimizing the path using the random
direction. If maxcount=0 only the maxtime will be used.maxtime
- [in] The maximal time allowed to optimize. If maxtime<=0 only the
maxcount will be used- Returns:
- The optimized path with node no further than stepsize apart
-
optimize
public SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t optimize(SWIGTYPE_p_rw__trajectory__PathT_rw__math__Q_t path)
Runs optimization algorithm
Runs the optimization algorithm using the parameters specified in the property map
- Parameters:
path
- [in] Path to optimize- Returns:
- The optimized path
-
getPROP_LOOPCOUNT
public java.lang.String getPROP_LOOPCOUNT()
Property key for the maximal number of loops. Set LOOPCOUNT=0 to deactivate it
-
getPROP_MAXTIME
public java.lang.String getPROP_MAXTIME()
Property key for max time. Set MAXTIME=0 to deactivate it
-
getPROP_STEPSIZE
public java.lang.String getPROP_STEPSIZE()
Property key for step size
-
getPropertyMap
public PropertyMap getPropertyMap()
Returns the PropertyMap associated with the optimizer.
The PropertyMap defines the following parameters used by the optimizer:
Property Name | Type | Default value
---------------------------------- | ------ | -------------
ClearanceOptimizer::PROP_LOOPCOUNT | int | 20
ClearanceOptimizer::PROP_MAXTIME | double | 200
ClearanceOptimizer::PROP_STEPSIZE | double | 0.1
- Returns:
- The PropertyMap
-
getClearanceCalculator
public ClearanceCalculatorCPtr getClearanceCalculator()
Returns the ClearanceCalculator associated with the optimizer.
- Returns:
- Const reference to the ClearanceCalculator.
-
setMinimumClearance
public void setMinimumClearance(double dist)
Sets the minimum clearance optimized for.
Points on the path with clearance greater than _minClearance are not optimized
further. Class default value is 0.1 meters. Value must be equal to or greater than zero.
- Parameters:
dist
- [in] Minimum clearance.
-
getMinimumClearance
public double getMinimumClearance()
Returns the minimum clearance optimized for.- Returns:
- The minimum clearance.
-
setStateConstraint
public void setStateConstraint(StateConstraintCPtr stateConstraint)
Set a state constraint in the clearance optimizer.
The optimizer will not generate a path with configurations that is in collision according
to the state constraint.
- Parameters:
stateConstraint
- [in] the constraint.
-
setQConstraint
public void setQConstraint(QConstraintCPtr qConstraint)
Set a configuration constraint in the clearance optimizer.
The optimizer will not generate a path with configurations that is in collision according
to the constraint.
- Parameters:
qConstraint
- [in] the constraint.
-
-