Class ClearanceOptimizerPtr


  • public class ClearanceOptimizerPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • 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

      • delete

        public void delete()
      • 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
      • 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 optimize
        stepsize - [in] Maximum size between configurations in the dense path
        maxcount - [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
      • 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.