Package org.robwork.sdurw_trajectory
Class TrajectorySequence_d
- java.lang.Object
-
- org.robwork.sdurw_trajectory.Trajectory_d
-
- org.robwork.sdurw_trajectory.TrajectorySequence_d
-
public class TrajectorySequence_d extends Trajectory_d
Combines a number of trajectories.
Takes an arbitrary number of trajectories and combines them. The start time of the first
trajectory determines the start time of the union. The remaining trajectories are appended
discardless of their start time. The duration of the union corresponds to the sum of the
duration of all the trajectories.
The value returned in the transition between two trajectories, corresponds to the end point
of the leading trajectory.
Access to a value is O(lg n) with n being the number of trajectories combined.
-
-
Constructor Summary
Constructors Constructor Description TrajectorySequence_d(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleddx(double t)Acceleration of trajectory at time t
Returns the acceleration of the trajectory at time t \in[startTime(), endTime()].
voiddelete()doubleduration()Total duration of the trajectory.
The duration of the Trajectory corresponds to the time it takes to
run through it.
If the trajectory is empty, then -1 is returned.doubledx(double t)Velocity of trajectory at time t
Returns the velocity of the trajectory at time t \in[startTime(), endTime()].
static longgetCPtr(TrajectorySequence_d obj)TrajectoryIterator_dPtrgetIterator(double dt)Returns a bi-directional interator for running through the trajectory.
For some trajectory types it may be significantly more efficient to run through
using an iterator, rather than using random access.
doublestartTime()Returns the startTime of the trajectory
doublex(double t)Position of trajectory at time t
Returns the position of the trajectory at time t \in[startTime(), endTime()].
-
Methods inherited from class org.robwork.sdurw_trajectory.Trajectory_d
endTime, getCPtr, getIterator, getPath, getPath
-
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(TrajectorySequence_d obj)
-
delete
public void delete()
- Overrides:
deletein classTrajectory_d
-
x
public double x(double t)
Description copied from class:Trajectory_dPosition of trajectory at time t
Returns the position of the trajectory at time t \in[startTime(), endTime()].
- Overrides:
xin classTrajectory_d- Parameters:
t- [in] time between startTime() and endTime()- Returns:
- Position
-
dx
public double dx(double t)
Description copied from class:Trajectory_dVelocity of trajectory at time t
Returns the velocity of the trajectory at time t \in[startTime(), endTime()].
- Overrides:
dxin classTrajectory_d- Parameters:
t- [in] time between startTime() and endTime()- Returns:
- Velocity
-
ddx
public double ddx(double t)
Description copied from class:Trajectory_dAcceleration of trajectory at time t
Returns the acceleration of the trajectory at time t \in[startTime(), endTime()].
- Overrides:
ddxin classTrajectory_d- Parameters:
t- [in] time between startTime() and endTime()- Returns:
- Acceleration
-
duration
public double duration()
Description copied from class:Trajectory_dTotal duration of the trajectory.
The duration of the Trajectory corresponds to the time it takes to
run through it.
If the trajectory is empty, then -1 is returned.- Overrides:
durationin classTrajectory_d
-
startTime
public double startTime()
Description copied from class:Trajectory_dReturns the startTime of the trajectory
- Overrides:
startTimein classTrajectory_d- Returns:
- Start time
-
getIterator
public TrajectoryIterator_dPtr getIterator(double dt)
Description copied from class:Trajectory_dReturns a bi-directional interator for running through the trajectory.
For some trajectory types it may be significantly more efficient to run through
using an iterator, rather than using random access.
- Overrides:
getIteratorin classTrajectory_d- Parameters:
dt- [in] The default time step used when using the ++ or -- operators in the
iterator
Pointer to the iterator. The pointer has ownership.
-
-