RobWorkProject  24.5.15-
Classes | Public Member Functions | List of all members
BlendedTrajectory< T > Class Template Reference

Implements a trajectory with blends between segments. TODO: Briefly describe how. More...

#include <BlendedTrajectory.hpp>

Inherits Trajectory< rw::math::Q >.

Public Member Functions

 BlendedTrajectory ()
 Default constructor creating an empty trajectory.
 
 BlendedTrajectory (rw::core::Ptr< rw::models::Device > deviceIn, const rw::trajectory::QPath &pathIn, const std::vector< double > &betaIn, const double vscaleIn, const double ascaleIn, const bool verbose=false)
 Constrcuts a trajectory. More...
 
virtual ~BlendedTrajectory ()
 Destructor.
 
x (double t) const
 Position of trajectory at time t. More...
 
dx (double t) const
 Velocity of trajectory at time t. More...
 
ddx (double t) const
 Acceleration of trajectory at time t. More...
 
double duration () const
 Total duration of the trajectory. More...
 
double startTime () const
 Returns the startTime of the trajectory. More...
 
double endTime () const
 Returns the endTime of the trajectory. More...
 
virtual rw::trajectory::TrajectoryIterator< T >::Ptr getIterator (double dt) const
 Returns a bi-directional interator for running through the trajectory. More...
 
const std::vector< double > & getBlendStartTimes ()
 
const std::vector< double > & getBlendEndTimes ()
 
- Public Member Functions inherited from Trajectory< rw::math::Q >
virtual ~Trajectory ()
 Destructor.
 
std::vector< rw::math::QgetPath (double dt, bool uniform=true)
 Constructs a discrete path based on the trajectory. More...
 

Additional Inherited Members

- Public Types inherited from Trajectory< rw::math::Q >
typedef rw::core::Ptr< Trajectory< rw::math::Q > > Ptr
 smart pointer type
 
- Protected Member Functions inherited from Trajectory< rw::math::Q >
 Trajectory ()
 Construct an empty trajectory.
 

Detailed Description

template<class T = rw::math::Q>
class rw::trajectory::BlendedTrajectory< T >

Implements a trajectory with blends between segments. TODO: Briefly describe how.

Constructor & Destructor Documentation

◆ BlendedTrajectory()

BlendedTrajectory ( rw::core::Ptr< rw::models::Device deviceIn,
const rw::trajectory::QPath pathIn,
const std::vector< double > &  betaIn,
const double  vscaleIn,
const double  ascaleIn,
const bool  verbose = false 
)

Constrcuts a trajectory.

Constructs a trajectory for device deviceIn. Points on the path is described by pathIn and the blend distances in betaIn. The number of blend distances has to be path length -2

To adjust the velocity and acceleration of the robot use vscaleIn and ascaleIn

Parameters
deviceIn[in] Device to create trajectory for
pathIn[in] The path for follow
betaIn[in] Blend distances
vscaleIn[in] The velocity scale [0;1]
ascaleIn[in] The acceleration scale [0;1]
verbose[in] True to print our debug text

Member Function Documentation

◆ ddx()

T ddx ( double  t) const
virtual

Acceleration of trajectory at time t.

Returns the acceleration of the trajectory at time t \(\in[startTime(), endTime()]\).

Parameters
t[in] time between startTime() and endTime()
Returns
Acceleration

Implements Trajectory< rw::math::Q >.

◆ duration()

double duration ( ) const
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< rw::math::Q >.

◆ dx()

T dx ( double  t) const
virtual

Velocity of trajectory at time t.

Returns the velocity of the trajectory at time t \(\in[startTime(), endTime()]\).

Parameters
t[in] time between startTime() and endTime()
Returns
Velocity

Implements Trajectory< rw::math::Q >.

◆ endTime()

double endTime ( ) const
inlinevirtual

Returns the endTime of the trajectory.

The end time equals startTime() + duration().

Returns
The end time

Reimplemented from Trajectory< rw::math::Q >.

◆ getIterator()

virtual rw::trajectory::TrajectoryIterator<T>::Ptr getIterator ( double  dt) const
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.

Parameters
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< rw::math::Q >.

◆ startTime()

double startTime ( ) const
inlinevirtual

Returns the startTime of the trajectory.

Returns
Start time

Implements Trajectory< rw::math::Q >.

◆ x()

T x ( double  t) const
virtual

Position of trajectory at time t.

Returns the position of the trajectory at time t \(\in[startTime(), endTime()]\).

Parameters
t[in] time between startTime() and endTime()
Returns
Position

Implements Trajectory< rw::math::Q >.


The documentation for this class was generated from the following file: