Thunderbots Project
Loading...
Searching...
No Matches
TrajectoryPath Class Reference

#include <trajectory_path.h>

Inheritance diagram for TrajectoryPath:
Collaboration diagram for TrajectoryPath:

Public Member Functions

 TrajectoryPath (const std::shared_ptr< Trajectory2D > &initial_trajectory, const TrajectoryGenerator &traj_generator)
 
void append (double connection_time_sec, const Point &destination, const KinematicConstraints &constraints)
 
Point getPosition (double t_sec) const override
 
Vector getVelocity (double t_sec) const override
 
Vector getAcceleration (double t_sec) const override
 
double getTotalTime () const override
 
std::vector< RectanglegetBoundingBoxes () const override
 
const std::vector< TrajectoryPathNode > & getTrajectoryPathNodes () const
 
- Public Member Functions inherited from Trajectory< Point, Vector, Vector >
Point getDestination () const
 

Detailed Description

TrajectoryPath represents a list of 2D trajectories that are connected end-to-end to form a path. A TrajectoryPathNode is a 2D trajectory and the time at which it ends and the next TrajectoryPathNode begins.

Constructor & Destructor Documentation

◆ TrajectoryPath()

TrajectoryPath ( const std::shared_ptr< Trajectory2D > &  initial_trajectory,
const TrajectoryGenerator &  traj_generator 
)

Constructor

Parameters
initial_trajectoryThe initial trajectory of this trajectory path
traj_generatorA function used to generate new trajectories given the kinematic constraints, initial position, final position, and initial velocity.

Member Function Documentation

◆ append()

void append ( double  connection_time_sec,
const Point destination,
const KinematicConstraints constraints 
)

Generate and append a new trajectory to the end of this trajectory path

Parameters
constraintsConstraints of the new generated trajectory
connection_time_secThe time where the last existing trajectory should connect to the newly generated trajectory
destinationDestination of the newly generated trajectory

◆ getAcceleration()

Vector getAcceleration ( double  t_sec) const
overridevirtual

Get the acceleration at time t of this trajectory path

Parameters
t_secThe time elapsed since the start of the trajectory path
Returns
The acceleration at time t

Implements Trajectory< Point, Vector, Vector >.

◆ getBoundingBoxes()

std::vector< Rectangle > getBoundingBoxes ( ) const
overridevirtual

Get the bounding boxes of the trajectory path

Returns
A list of bounding boxes which wrap this trajectory path

Implements Trajectory2D.

◆ getPosition()

Point getPosition ( double  t_sec) const
overridevirtual

Get the position at time t of this trajectory path

Parameters
t_secThe time elapsed since the start of the trajectory path
Returns
The position at time t

Implements Trajectory< Point, Vector, Vector >.

◆ getTotalTime()

double getTotalTime ( ) const
overridevirtual

Get the total duration of the trajectory until it reaches the destination

Returns
The total duration for this trajectory path

Implements Trajectory< Point, Vector, Vector >.

◆ getTrajectoryPathNodes()

const std::vector< TrajectoryPathNode > & getTrajectoryPathNodes ( ) const

Get the list of TrajectoryPathNodes that make up this trajectory path

Returns
The list of TrajectoryPathNodes that make up this trajectory path

◆ getVelocity()

Vector getVelocity ( double  t_sec) const
overridevirtual

Get the velocity at time t of this trajectory path

Parameters
t_secThe time elapsed since the start of the trajectory path
Returns
The velocity at time t

Implements Trajectory< Point, Vector, Vector >.


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