public class Trajectory
extends java.lang.Object
implements java.io.Serializable
PoseSteerings) plus a temporal profile.
The latter is represented as fixed durations between between successive PoseSteerings along the path.| Constructor and Description |
|---|
Trajectory(Pose[] pa)
Create a new
Trajectory given a list of Poses. |
Trajectory(Pose[] pa,
double[] dts)
|
Trajectory(PoseSteering[] psa)
Create a new
Trajectory given a list of PoseSteerings. |
Trajectory(PoseSteering[] psa,
double[] dts)
|
Trajectory(java.lang.String... fileNames)
Create a new
Trajectory given a list files containing paths. |
Trajectory(java.lang.String fileName)
Create a new
Trajectory given list of PoseSteerings that is read
from a file. |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getDTs()
Get the temporal profile of this
Trajectory. |
double[] |
getDts(int from,
int to)
Get the temporal profile of a portion of this this
Trajectory. |
Pose[] |
getPose()
Get the path (list of
Poses) of this Trajectory. |
PoseSteering[] |
getPoseSteering()
Get the path (list of
PoseSteerings) of this Trajectory. |
com.vividsolutions.jts.geom.Coordinate[] |
getPositions()
Get the list of positions in this
Trajectory's path. |
int |
getSequenceNumber(com.vividsolutions.jts.geom.Coordinate coord)
Get the sequence number of the path point that is closest to a
given coordinate.
|
int |
getSequenceNumberEnd()
Get the end sequence number of this trajectory.
|
int |
getSequenceNumberStart()
Get the start sequence number of this trajectory.
|
double |
getTimeLeftEstimate(com.vividsolutions.jts.geom.Coordinate positionNow)
Get an estimate of the time left to move on this
Trajectory
given the current position. |
double |
getTimeLeftEstimate(int sequenceNum)
Get an estimate of the time left to move on this
Trajectory
given the current path index. |
double |
getTimeToEstimate(int sequenceNumNow,
int sequenceNumTo)
Get an estimate of the time left to move on this
Trajectory
between two path indices. |
void |
setDTs(double[] dts)
Set the minimum transition times between path poses
of this
Trajectory. |
void |
updateSequenceNumbers(int start,
int end)
Update the sequence numbers of this trajectory (used when this is
a trajectory of a sub-trajectory envelope).
|
public Trajectory(Pose[] pa)
Trajectory given a list of Poses. The
temporal profile of the trajectory is computed via naive numeric resolution
assuming constant acceleration and a maximum speed.pa - The list of Poses used to build the path.public Trajectory(PoseSteering[] psa)
Trajectory given a list of PoseSteerings. The
temporal profile of the trajectory is computed via naive numeric resolution
assuming constant acceleration and a maximum speed.psa - The list of PoseSteerings used to build the path.public Trajectory(Pose[] pa, double[] dts)
pa - The list of PoseSteerings used to build the path.dts - The temporal profile of the Trajectory (times between successive points
along the path). The zero-th element is assumed to represent the time to transition from the
first point along the path to the second point along the path. The last element of this parameter
should be zero.public Trajectory(PoseSteering[] psa, double[] dts)
psa - The list of PoseSteerings used to build the path.dts - The temporal profile of the Trajectory (times between successive points
along the path). The zero-th element is assumed to represent the time to transition from the
first point along the path to the second point along the path. The last element of this parameter
should be zero.public Trajectory(java.lang.String fileName)
Trajectory given list of PoseSteerings that is read
from a file. The temporal profile of the trajectory is computed via naive numeric resolution
assuming constant acceleration and a maximum speed.fileName - The path of a file pointing to the list of PoseSteerings used to build the path.public Trajectory(java.lang.String... fileNames)
Trajectory given a list files containing paths.
The temporal profile of the trajectory is computed via naive numeric resolution
assuming constant acceleration and a maximum speed.fileNames - The paths of files, each containing a list of PoseSteerings used to build the path.public void updateSequenceNumbers(int start,
int end)
start - The start sequence number in the super TrajectoryEnvelope.end - The end sequence number in the super TrajectoryEnvelope.public int getSequenceNumberStart()
public int getSequenceNumberEnd()
public double[] getDTs()
Trajectory.Trajectory.public double[] getDts(int from,
int to)
Trajectory.from - The index of the starting path point.to - The index of the last path point.Trajectory.public int getSequenceNumber(com.vividsolutions.jts.geom.Coordinate coord)
coord - The coordinate to which the closest sequence number should be found.public double getTimeLeftEstimate(com.vividsolutions.jts.geom.Coordinate positionNow)
Trajectory
given the current position. The estimate is based on this Trajectory's
temporal profile.positionNow - The position from which the estimate should be computed.Trajectory
given the current position.public double getTimeToEstimate(int sequenceNumNow,
int sequenceNumTo)
Trajectory
between two path indices. The estimate is based on this Trajectory's
temporal profile.sequenceNumNow - The path index from which the estimate should be computed.sequenceNumTo - The path index to which the estimate should be computed.Trajectory
given the current path index.public double getTimeLeftEstimate(int sequenceNum)
Trajectory
given the current path index. The estimate is based on this Trajectory's
temporal profile.sequenceNum - The path index from which the estimate should be computed.Trajectory
given the current path index.public void setDTs(double[] dts)
Trajectory. This is essentially the fastest
time profile of this Trajectory.dts - A vector containing the minimum transition times between path poses
of this Trajectory. Values are assumed to be in seconds.public PoseSteering[] getPoseSteering()
PoseSteerings) of this Trajectory.PoseSteerings) of this Trajectory.public Pose[] getPose()
Poses) of this Trajectory.Poses) of this Trajectory.public com.vividsolutions.jts.geom.Coordinate[] getPositions()
Trajectory's path.Trajectory's path.