Package org.robwork.sdurw_pathplanners
Class SBLExpandPtr
- java.lang.Object
-
- org.robwork.sdurw_pathplanners.SBLExpandPtr
-
public class SBLExpandPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description SBLExpandPtr()
Default constructor yielding a NULL-pointer.SBLExpandPtr(long cPtr, boolean cMemoryOwn)
SBLExpandPtr(SBLExpand 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 SBLExpand
__ref__()
Dereferencing operator.void
delete()
SBLExpand
deref()
The pointer stored in the object.boolean
equals(SBLExpand p)
Q
expand(Q q)
A configuration sampled from the vicinity of q.
Implementation dependant, the sampler may return the empty
configuration if no configurations can be sampled near q.static long
getCPtr(SBLExpandPtr obj)
SBLExpand
getDeref()
Member access operator.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipSBLExpandPtr
makeShrinkingUniformBox(QConstraintPtr constraint, PairQ outer, double ratio)
Sample within a box of shrinking size until a collision free
configuration is found.
The inner box shrinks in size as 1, 1/2, 1/3, ...
This form of expansion is typical for SBL planners.
The inner and outer box are specified as explained for
makeUniformBox().SBLExpandPtr
makeShrinkingUniformBox(QConstraintPtr constraint, PairQ outer, PairQ inner)
Sample within a box of decreasing size until a collision free
configuration is found.
The inner box shrinks in size as 1, 1/2, 1/3, ...
This form of expansion is typical for SBL planners.
The inner and outer box are specified as explained for
makeUniformBox().SBLExpandPtr
makeShrinkingUniformJacobianBox(QConstraintPtr constraint, DevicePtr device, State state, JacobianCalculatorPtr jacobian)
Sample within a box of shrinking size until a collision free
configuration is found.
The size of the inner box depends on the Jacobian of the current
configuration.SBLExpandPtr
makeShrinkingUniformJacobianBox(QConstraintPtr constraint, DevicePtr device, State state, JacobianCalculatorPtr jacobian, double angle_max)
Sample within a box of shrinking size until a collision free
configuration is found.
The size of the inner box depends on the Jacobian of the current
configuration.SBLExpandPtr
makeShrinkingUniformJacobianBox(QConstraintPtr constraint, DevicePtr device, State state, JacobianCalculatorPtr jacobian, double angle_max, double disp_max)
Sample within a box of shrinking size until a collision free
configuration is found.
The size of the inner box depends on the Jacobian of the current
configuration.SBLExpandPtr
makeUniformBox(PairQ outer, double ratio)
Expansion within a scaled down box of the configuration space.
Given a configuration q, the expand() method samples a
configuration uniformly at random from the intersection between
q + inner
and
outer
where inner equals outer scaled by a factor of ratio and
centered at origo.
This is a form of expansion you will use in a standard implementation
of an SBL planner.
ratio must be positive.
If outer is non-empty, the expand() method will always return a
non-empty configuration.SBLExpandPtr
makeUniformBox(PairQ outer, PairQ inner)
Expansion within the overlap of an inner and outer box.
Given a configuration q, the expand() method returns a configuration
sampled uniformly at random from the intersection between
q + inner
and
outer
Given a device, you typically use device.getBounds() as the box
for the outer configuration space.
If the overlap between the boxes is empty, expand() returns the empty
configuration.
-
-
-
Constructor Detail
-
SBLExpandPtr
public SBLExpandPtr(long cPtr, boolean cMemoryOwn)
-
SBLExpandPtr
public SBLExpandPtr()
Default constructor yielding a NULL-pointer.
-
SBLExpandPtr
public SBLExpandPtr(SBLExpand ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(SBLExpandPtr obj)
-
delete
public void delete()
-
deref
public SBLExpand deref()
The pointer stored in the object.
-
__ref__
public SBLExpand __ref__()
Dereferencing operator.
-
getDeref
public SBLExpand getDeref()
Member access operator.
-
equals
public boolean equals(SBLExpand 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
-
expand
public Q expand(Q q)
A configuration sampled from the vicinity of q.
Implementation dependant, the sampler may return the empty
configuration if no configurations can be sampled near q.
-
makeUniformBox
public SBLExpandPtr makeUniformBox(PairQ outer, PairQ inner)
Expansion within the overlap of an inner and outer box.
Given a configuration q, the expand() method returns a configuration
sampled uniformly at random from the intersection between
q + inner
and
outer
Given a device, you typically use device.getBounds() as the box
for the outer configuration space.
If the overlap between the boxes is empty, expand() returns the empty
configuration.
-
makeUniformBox
public SBLExpandPtr makeUniformBox(PairQ outer, double ratio)
Expansion within a scaled down box of the configuration space.
Given a configuration q, the expand() method samples a
configuration uniformly at random from the intersection between
q + inner
and
outer
where inner equals outer scaled by a factor of ratio and
centered at origo.
This is a form of expansion you will use in a standard implementation
of an SBL planner.
ratio must be positive.
If outer is non-empty, the expand() method will always return a
non-empty configuration.
-
makeShrinkingUniformBox
public SBLExpandPtr makeShrinkingUniformBox(QConstraintPtr constraint, PairQ outer, PairQ inner)
Sample within a box of decreasing size until a collision free
configuration is found.
The inner box shrinks in size as 1, 1/2, 1/3, ...
This form of expansion is typical for SBL planners.
The inner and outer box are specified as explained for
makeUniformBox().
-
makeShrinkingUniformBox
public SBLExpandPtr makeShrinkingUniformBox(QConstraintPtr constraint, PairQ outer, double ratio)
Sample within a box of shrinking size until a collision free
configuration is found.
The inner box shrinks in size as 1, 1/2, 1/3, ...
This form of expansion is typical for SBL planners.
The inner and outer box are specified as explained for
makeUniformBox().
-
makeShrinkingUniformJacobianBox
public SBLExpandPtr makeShrinkingUniformJacobianBox(QConstraintPtr constraint, DevicePtr device, State state, JacobianCalculatorPtr jacobian, double angle_max, double disp_max)
Sample within a box of shrinking size until a collision free
configuration is found.
The size of the inner box depends on the Jacobian of the current
configuration. The radius for the i'th dimension of the inner box is
R_i = min(angle_max / angle_vel, disp_max / disp_vel)
where angle_vel is the magnitude of the angular velocity and disp_vel
is the magnitude of the translational velocity.
If jacobian is NULL, a default device Jacobian is chosen based on
device.
If angle_max or disp_max is negative, a default value for the
variable is chosen.
The inner box shrinks in size as 1, 1/2, 1/3, ...
-
makeShrinkingUniformJacobianBox
public SBLExpandPtr makeShrinkingUniformJacobianBox(QConstraintPtr constraint, DevicePtr device, State state, JacobianCalculatorPtr jacobian, double angle_max)
Sample within a box of shrinking size until a collision free
configuration is found.
The size of the inner box depends on the Jacobian of the current
configuration. The radius for the i'th dimension of the inner box is
R_i = min(angle_max / angle_vel, disp_max / disp_vel)
where angle_vel is the magnitude of the angular velocity and disp_vel
is the magnitude of the translational velocity.
If jacobian is NULL, a default device Jacobian is chosen based on
device.
If angle_max or disp_max is negative, a default value for the
variable is chosen.
The inner box shrinks in size as 1, 1/2, 1/3, ...
-
makeShrinkingUniformJacobianBox
public SBLExpandPtr makeShrinkingUniformJacobianBox(QConstraintPtr constraint, DevicePtr device, State state, JacobianCalculatorPtr jacobian)
Sample within a box of shrinking size until a collision free
configuration is found.
The size of the inner box depends on the Jacobian of the current
configuration. The radius for the i'th dimension of the inner box is
R_i = min(angle_max / angle_vel, disp_max / disp_vel)
where angle_vel is the magnitude of the angular velocity and disp_vel
is the magnitude of the translational velocity.
If jacobian is NULL, a default device Jacobian is chosen based on
device.
If angle_max or disp_max is negative, a default value for the
variable is chosen.
The inner box shrinks in size as 1, 1/2, 1/3, ...
-
-