RobWorkProject  23.9.11-
Public Member Functions | List of all members
CircularInterpolator< rw::math::Vector3D< T > > Class Template Reference

Makes circular interpolation based on rw::math::Vector3D. More...

#include <CircularInterpolator.hpp>

Inherits Interpolator< rw::math::Vector3D< T > >.

Public Member Functions

 CircularInterpolator (const rw::math::Vector3D< T > &p1, const rw::math::Vector3D< T > &p2, const rw::math::Vector3D< T > &p3, double duration)
 Constructs circular interpolator from 3 points. More...
 
virtual ~CircularInterpolator ()
 Destructor.
 
rw::math::Vector3D< T > x (double t) const
 Position at time t. More...
 
rw::math::Vector3D< T > dx (double t) const
 Velocity at time t. More...
 
rw::math::Vector3D< T > ddx (double t) const
 Acceleration at time t. More...
 
double duration () const
 Returns the duration of the interpolator. More...
 
const rw::math::Vector3D< T > & getP1 () const
 
const rw::math::Vector3D< T > & getP2 () const
 
const rw::math::Vector3D< T > & getP3 () const
 
- Public Member Functions inherited from Interpolator< rw::math::Vector3D< T > >
virtual ~Interpolator ()
 Virtual destructor.
 

Additional Inherited Members

- Public Types inherited from Interpolator< rw::math::Vector3D< T > >
typedef rw::core::Ptr< InterpolatorPtr
 smart pointer type to this class
 

Detailed Description

template<class T>
class rw::trajectory::CircularInterpolator< rw::math::Vector3D< T > >

Makes circular interpolation based on rw::math::Vector3D.

CircularInterpolator<rw::math::Vector3D<T> > implements a circular interpolation for 3D points stored in a rw::math::Vector3D<T>.

The template argument T specified whether to use float or double.

The CircularInterpolator is constructed based on 3 points, which defines the plane in which the interpolation occurs.

Constructor & Destructor Documentation

◆ CircularInterpolator()

CircularInterpolator ( const rw::math::Vector3D< T > &  p1,
const rw::math::Vector3D< T > &  p2,
const rw::math::Vector3D< T > &  p3,
double  duration 
)
inline

Constructs circular interpolator from 3 points.

Calculates the parameters of the circle based on a start point p1, end point p3 and an intermediate point p2.

If the three points are on a straight line an exception will be thrown.

Parameters
p1[in] Start point of circular interpolator
p2[in] Intermediate point on the circle
p3[in] End point of circular interpolator
duration[in] Duration of the segment

Member Function Documentation

◆ ddx()

rw::math::Vector3D<T> ddx ( double  t) const
inlinevirtual

Acceleration at time t.

Parameters
t[in] time between 0 and length
Returns
Acceleration

Implements Interpolator< rw::math::Vector3D< T > >.

◆ duration()

double duration ( ) const
inlinevirtual

Returns the duration of the interpolator.

The duration is defined as the time it takes to move from one end of the interpolator to the other.

Returns
duration

Implements Interpolator< rw::math::Vector3D< T > >.

◆ dx()

rw::math::Vector3D<T> dx ( double  t) const
inlinevirtual

Velocity at time t.

Parameters
t[in] time between 0 and length
Returns
Velocity

Implements Interpolator< rw::math::Vector3D< T > >.

◆ x()

rw::math::Vector3D<T> x ( double  t) const
inlinevirtual

Position at time t.

Parameters
t[in] time between 0 and length
Returns
Position

Implements Interpolator< rw::math::Vector3D< T > >.


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