DUNE: Uniform Navigational Environment  2019.02.0
Maneuver::FollowTrajectory::Task Struct Reference

Public Member Functions

 Task (const std::string &name, DUNE::Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
bool canInit (const IMC::FollowTrajectory *maneuver)
 
void onPathCompletion (void)
 
void step (const IMC::EstimatedState &estate)
 
bool isFeasible (void)
 
double speed (int curr)
 
double dist (int p1, int p2)
 

Public Attributes

IMC::DesiredSpeed m_maneuver_speed
 
double m_last_actuation
 
double m_zero_time
 
bool m_done
 
int m_curr
 
Arguments m_args
 

Constructor & Destructor Documentation

Member Function Documentation

bool Maneuver::FollowTrajectory::Task::canInit ( const IMC::FollowTrajectory *  maneuver)
inline
double Maneuver::FollowTrajectory::Task::dist ( int  p1,
int  p2 
)
inline

Function for computing the horizontal distance between two points in the trajectory.

Referenced by speed(), and step().

bool Maneuver::FollowTrajectory::Task::isFeasible ( void  )
inline

Function for testing the trajectory's feasibility.

References m_args, Maneuver::FollowTrajectory::Arguments::max_speed, Maneuver::FollowTrajectory::Arguments::mps_control, and speed().

Referenced by canInit().

void Maneuver::FollowTrajectory::Task::onPathCompletion ( void  )
inline

References m_done.

void Maneuver::FollowTrajectory::Task::onUpdateParameters ( void  )
inline
double Maneuver::FollowTrajectory::Task::speed ( int  curr)
inline

Function for computing the speed for travelling to the next point.

References dist().

Referenced by isFeasible(), and step().

Member Data Documentation

Arguments Maneuver::FollowTrajectory::Task::m_args
int Maneuver::FollowTrajectory::Task::m_curr

Number of current waypoint number.

Referenced by canInit(), and step().

bool Maneuver::FollowTrajectory::Task::m_done

Path completion flag.

Referenced by canInit(), onPathCompletion(), and step().

double Maneuver::FollowTrajectory::Task::m_last_actuation

Last actuation sent to the motor (used to compute actuation step.

Referenced by canInit(), and step().

IMC::DesiredSpeed Maneuver::FollowTrajectory::Task::m_maneuver_speed

FollowTrajectory maneuver's speed.

Referenced by canInit().

double Maneuver::FollowTrajectory::Task::m_zero_time

Time value to be used as reference.

Referenced by canInit(), and step().

Collaboration diagram for Maneuver::FollowTrajectory::Task:
Collaboration graph