Thunderbots Project
Loading...
Searching...
No Matches
Trajectory< P, V, A > Class Template Referenceabstract

#include <trajectory.hpp>

Public Member Functions

virtual P getPosition (double t_sec) const =0
 
virtual V getVelocity (double t_sec) const =0
 
virtual A getAcceleration (double t_sec) const =0
 
virtual double getTotalTime () const =0
 
getDestination () const
 

Detailed Description

template<class P, class V, class A>
class Trajectory< P, V, A >

Interface for a trajectory

A trajectory is a path that is parameterized by time. It is a function that takes in a time and returns a position, velocity, and acceleration.

Template Parameters
PThe type of position
VThe type of velocity
AThe type of acceleration

Member Function Documentation

◆ getAcceleration()

template<class P , class V , class A >
virtual A getAcceleration ( double  t_sec) const
pure virtual

Get acceleration at time t

Parameters
t_secDuration elapsed since start of trajectory in seconds
Returns
acceleration

Implemented in BangBangTrajectory1D, BangBangTrajectory1DAngular, BangBangTrajectory2D, and TrajectoryPath.

◆ getDestination()

template<class P , class V , class A >
P getDestination ( ) const
inline

Get the final desired destination

Returns
The position which the trajectory ends at

◆ getPosition()

template<class P , class V , class A >
virtual P getPosition ( double  t_sec) const
pure virtual

Get position at time t

Parameters
t_secDuration elapsed since start of trajectory in seconds
Returns
position

Implemented in BangBangTrajectory1D, BangBangTrajectory1DAngular, BangBangTrajectory2D, and TrajectoryPath.

◆ getTotalTime()

template<class P , class V , class A >
virtual double getTotalTime ( ) const
pure virtual

Get total runtime of trajectory

Returns
total time for trajectory in seconds

Implemented in BangBangTrajectory1D, BangBangTrajectory1DAngular, BangBangTrajectory2D, and TrajectoryPath.

◆ getVelocity()

template<class P , class V , class A >
virtual V getVelocity ( double  t_sec) const
pure virtual

Get velocity at time t

Parameters
t_secDuration elapsed since start of trajectory in seconds
Returns
velocity

Implemented in BangBangTrajectory1D, BangBangTrajectory1DAngular, BangBangTrajectory2D, and TrajectoryPath.


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