Package org.robwork.sdurw_pathplanning
Class QEdgeConstraintIncremental
- java.lang.Object
-
- org.robwork.sdurw_pathplanning.QEdgeConstraintIncremental
-
public class QEdgeConstraintIncremental extends java.lang.Object
Edge constraint interface for incremental testing of an edge
An edge constraint represents a path that connects a pair of
configurations and checks if this path can be traversed.
The edge constraint may assume that the start and end configurations are
valid (e.g. not colliding).
Each edge has a non-negative cost measuring the degree to which the path
connecting the configurations has been verified. You can use the cost
measure to for example always verify the edge for which the most of the
path still remains to be verified. The exact meaning of the cost is
defined by the specific subclass.
Given an edge planner you can construct a new edge planner of the same
type, but for a new pair of configurations, with
QEdgeConstraint::instance().
-
-
Constructor Summary
Constructors Constructor Description QEdgeConstraintIncremental(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(QEdgeConstraintIncremental obj)
Q
getEnd()
The end configuration of the path.Q
getStart()
The start configuration of the path.boolean
inCollision()
True if the path connecting the start and end configuration
can't be traversed.boolean
inCollision(Q start, Q end)
True if the path from start to end can't be traversed.
double
inCollisionCost()
Non-negative measure of the amount of the path that still
remains to be verified.
The exact definition of the cost is decided by the subclass.
The cost of an edge should strictly decrease for every call of
verifyIncrement().
The cost of a fully verified edge can be 0, but does not have to be.boolean
inCollisionPartialCheck()
Perform a partial check of the path and return true if a
collision was found.
Full check of the path can be implemented in terms of a sequence of
partial checks.QEdgeConstraintIncrementalPtr
instance(Q start, Q end)
An edge constraint for a pair of configurations.
boolean
isFullyChecked()
True if the path has been fully checked.
To check a path, either call inCollision() or repeatedly call
inCollisionPartialCheck() until inCollisionPartialCheck() returns
false or isFullyChecked() returns true.static QEdgeConstraintIncrementalPtr
make(QConstraintPtr constraint, MetricQPtr metric)
Discrete path verification for a linearly interpolated path.
Linearly interpolate from start to end configuration until the
distance between pairs of configurations is resolution when
measured by metric.static QEdgeConstraintIncrementalPtr
make(QConstraintPtr constraint, MetricQPtr metric, double resolution)
Discrete path verification for a linearly interpolated path.
Linearly interpolate from start to end configuration until the
distance between pairs of configurations is resolution when
measured by metric.static QEdgeConstraintIncrementalPtr
makeDefault(QConstraintPtr constraint, DevicePtr device)
Default edge constraint for a configuration constraint and a
device.
Start and end configurations are connected by a straight line in the
configuration space and are checked by a default collision checking
resolution.static QEdgeConstraintIncrementalPtr
makeFixed(boolean value)
A fixed edge constraint.
The fixed edge constraint always returns value from inCollision().void
reset(Q start, Q end)
Reset the object to use a different pair of start and end
configurations.
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(QEdgeConstraintIncremental obj)
-
delete
public void delete()
-
inCollision
public boolean inCollision(Q start, Q end)
True if the path from start to end can't be traversed.
- Parameters:
start
- [in] Start configuration.end
- [in] End configuration.
-
inCollision
public boolean inCollision()
True if the path connecting the start and end configuration
can't be traversed.
-
inCollisionCost
public double inCollisionCost()
Non-negative measure of the amount of the path that still
remains to be verified.
The exact definition of the cost is decided by the subclass.
The cost of an edge should strictly decrease for every call of
verifyIncrement().
The cost of a fully verified edge can be 0, but does not have to be.
-
inCollisionPartialCheck
public boolean inCollisionPartialCheck()
Perform a partial check of the path and return true if a
collision was found.
Full check of the path can be implemented in terms of a sequence of
partial checks. The isFullyChecked() method returns true when there
are no more partial checks to be done.
-
isFullyChecked
public boolean isFullyChecked()
True if the path has been fully checked.
To check a path, either call inCollision() or repeatedly call
inCollisionPartialCheck() until inCollisionPartialCheck() returns
false or isFullyChecked() returns true.
-
instance
public QEdgeConstraintIncrementalPtr instance(Q start, Q end)
An edge constraint for a pair of configurations.
- Parameters:
start
- [in] Start configuration of pathend
- [in] End configuration of path
-
getStart
public Q getStart()
The start configuration of the path.
-
getEnd
public Q getEnd()
The end configuration of the path.
-
reset
public void reset(Q start, Q end)
Reset the object to use a different pair of start and end
configurations.
-
make
public static QEdgeConstraintIncrementalPtr make(QConstraintPtr constraint, MetricQPtr metric, double resolution)
Discrete path verification for a linearly interpolated path.
Linearly interpolate from start to end configuration until the
distance between pairs of configurations is resolution when
measured by metric. Verify each configuration by constraint.
The cost is defined as the distance (measured by metric) between
pairs of configurations currently verified by constraint.
The metric must be well-behaved, i.e. linear.
You can pass empty configurations as start and end to construct
an initial edge planner that you can instance() with better
configurations later.
Start and end configurations for this initial planner are set to the
empty configuration.
-
make
public static QEdgeConstraintIncrementalPtr make(QConstraintPtr constraint, MetricQPtr metric)
Discrete path verification for a linearly interpolated path.
Linearly interpolate from start to end configuration until the
distance between pairs of configurations is resolution when
measured by metric. Verify each configuration by constraint.
The cost is defined as the distance (measured by metric) between
pairs of configurations currently verified by constraint.
The metric must be well-behaved, i.e. linear.
You can pass empty configurations as start and end to construct
an initial edge planner that you can instance() with better
configurations later.
Start and end configurations for this initial planner are set to the
empty configuration.
-
makeDefault
public static QEdgeConstraintIncrementalPtr makeDefault(QConstraintPtr constraint, DevicePtr device)
Default edge constraint for a configuration constraint and a
device.
Start and end configurations are connected by a straight line in the
configuration space and are checked by a default collision checking
resolution.
-
makeFixed
public static QEdgeConstraintIncrementalPtr makeFixed(boolean value)
A fixed edge constraint.
The fixed edge constraint always returns value from inCollision().
-
-