RobWorkProject
24.12.4-
|
Combines a number of trajectories. More...
#include <TrajectorySequence.hpp>
Inherits Trajectory< T >.
Public Types | |
typedef rw::core::Ptr< TrajectorySequence< T > > | Ptr |
smart pointer type | |
Public Types inherited from Trajectory< T > | |
typedef rw::core::Ptr< Trajectory< T > > | Ptr |
smart pointer type | |
Public Member Functions | |
TrajectorySequence (const std::vector< typename rw::trajectory::Trajectory< T >::Ptr > trajectories) | |
Create a trajectory from trajectories. More... | |
TrajectorySequence (typename rw::trajectory::Trajectory< T >::Ptr trajectory1, typename rw::trajectory::Trajectory< T >::Ptr trajectory2) | |
Create a trajectory from trajectory1 and \ trajectory2. More... | |
virtual T | x (double t) const |
Position of trajectory at time t. More... | |
virtual T | dx (double t) const |
Velocity of trajectory at time t. More... | |
virtual T | ddx (double t) const |
Acceleration of trajectory at time t. More... | |
virtual double | duration () const |
Total duration of the trajectory. More... | |
virtual double | startTime () const |
Returns the startTime of the trajectory. More... | |
rw::trajectory::TrajectoryIterator< T >::Ptr | getIterator (double dt) const |
Returns a bi-directional interator for running through the trajectory. More... | |
Public Member Functions inherited from Trajectory< T > | |
virtual | ~Trajectory () |
Destructor. | |
virtual double | endTime () const |
Returns the endTime of the trajectory. More... | |
std::vector< T > | getPath (double dt, bool uniform=true) |
Constructs a discrete path based on the trajectory. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Trajectory< T > | |
Trajectory () | |
Construct an empty trajectory. | |
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.
|
inline |
Create a trajectory from trajectories.
trajectories | [in] Trajectories to join. |
|
inline |
Create a trajectory from trajectory1 and \ trajectory2.
trajectory1 | [in] First trajectory |
trajectory2 | [in] Second trajectory |
|
inlinevirtual |
Acceleration of trajectory at time t.
Returns the acceleration of the trajectory at time t \(\in[startTime(), endTime()]\).
t | [in] time between startTime() and endTime() |
Implements Trajectory< T >.
|
inlinevirtual |
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.
Implements Trajectory< T >.
|
inlinevirtual |
Velocity of trajectory at time t.
Returns the velocity of the trajectory at time t \(\in[startTime(), endTime()]\).
t | [in] time between startTime() and endTime() |
Implements Trajectory< T >.
|
inlinevirtual |
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.
dt | [in] The default time step used when using the ++ or – operators in the iterator |
Pointer to the iterator. The pointer has ownership.
Implements Trajectory< T >.
|
inlinevirtual |
|
inlinevirtual |
Position of trajectory at time t.
Returns the position of the trajectory at time t \(\in[startTime(), endTime()]\).
t | [in] time between startTime() and endTime() |
Implements Trajectory< T >.