DUNE: Uniform Navigational Environment  2.4.2
Monitors::Collisions::Task Struct Reference

Detailed Description

Collisions task.

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
void onUpdateParameters (void)
 
void onResourceInitialization (void)
 
void onEntityResolution (void)
 
void onResourceRelease (void)
 
void consume (const IMC::Acceleration *msg)
 
void consume (const IMC::EstimatedState *msg)
 
void consume (const IMC::Brake *msg)
 
void consume (const IMC::Rpm *msg)
 
void consume (const IMC::VehicleMedium *msg)
 
bool ignoreCollision (void)
 
void collided (void)
 
void onMain (void)
 

Public Attributes

MovingAverage< double > * m_avg_x_innov
 
MovingAverage< double > * m_avg_z_innov
 
MovingAverage< double > * m_avg_x_abs
 
MovingAverage< double > * m_avg_z_abs
 
Time::Counter< double > m_twindow
 
IMC::Collision m_collision
 
IMC::VehicleMedium m_vm
 
unsigned m_device_eid
 
float m_depth
 
bool m_braking
 
int m_rpms
 
Arguments m_args
 

Constructor & Destructor Documentation

Member Function Documentation

void Monitors::Collisions::Task::collided ( void  )
inline

This routine is called when a collision is detected.

References ignoreCollision(), m_collision, and m_twindow.

Referenced by consume().

void Monitors::Collisions::Task::consume ( const IMC::EstimatedState *  msg)
inline

References m_depth.

void Monitors::Collisions::Task::consume ( const IMC::Brake *  msg)
inline

References m_braking.

void Monitors::Collisions::Task::consume ( const IMC::Rpm *  msg)
inline

References m_rpms.

void Monitors::Collisions::Task::consume ( const IMC::VehicleMedium *  msg)
inline

References m_vm.

bool Monitors::Collisions::Task::ignoreCollision ( void  )
inline

Check if the collision should be ignored.

Returns
true if collision should be ignored

References m_args, m_braking, m_depth, m_rpms, and Monitors::Collisions::Arguments::min_depth.

Referenced by collided().

void Monitors::Collisions::Task::onEntityResolution ( void  )
inline
void Monitors::Collisions::Task::onMain ( void  )
inline

References m_twindow.

void Monitors::Collisions::Task::onResourceInitialization ( void  )
inline
void Monitors::Collisions::Task::onResourceRelease ( void  )
inline
void Monitors::Collisions::Task::onUpdateParameters ( void  )
inline

Member Data Documentation

Arguments Monitors::Collisions::Task::m_args
MovingAverage<double>* Monitors::Collisions::Task::m_avg_x_abs

Accelerations along x-axis moving average for absolute limits threshold checking.

Referenced by consume(), onResourceInitialization(), and onResourceRelease().

MovingAverage<double>* Monitors::Collisions::Task::m_avg_x_innov

Accelerations along x-axis moving average for innovation limits threshold checking.

Referenced by consume(), onResourceInitialization(), and onResourceRelease().

MovingAverage<double>* Monitors::Collisions::Task::m_avg_z_abs

Accelerations along z-axis moving average for absolute limits threshold checking.

Referenced by consume(), onResourceInitialization(), and onResourceRelease().

MovingAverage<double>* Monitors::Collisions::Task::m_avg_z_innov

Accelerations along z-axis moving average for innovation limits threshold checking.

Referenced by consume(), onResourceInitialization(), and onResourceRelease().

bool Monitors::Collisions::Task::m_braking

True if braking.

Referenced by consume(), and ignoreCollision().

IMC::Collision Monitors::Collisions::Task::m_collision

Collision detected.

Referenced by collided(), and consume().

float Monitors::Collisions::Task::m_depth

Depth value.

Referenced by consume(), and ignoreCollision().

unsigned Monitors::Collisions::Task::m_device_eid

Device entity id.

Referenced by consume(), and onEntityResolution().

int Monitors::Collisions::Task::m_rpms

Motor's rpms.

Referenced by consume(), and ignoreCollision().

Time::Counter<double> Monitors::Collisions::Task::m_twindow

Time window to remain in error mode after colliding.

Referenced by collided(), onMain(), and onUpdateParameters().

IMC::VehicleMedium Monitors::Collisions::Task::m_vm

Vehicle Medium.

Referenced by consume().

Collaboration diagram for Monitors::Collisions::Task:
Collaboration graph