Public Member Functions | Protected Types | Protected Attributes | List of all members
dwb_critics::OscillationCritic::CommandTrend Class Reference

Helper class for performing the same logic on the x,y and theta dimensions. More...

#include <oscillation.h>

Public Member Functions

 CommandTrend ()
 
bool hasSignFlipped ()
 Check whether we are currently tracking a flipped sign. More...
 
bool isOscillating (double velocity)
 Check to see whether the proposed velocity would be considered oscillating. More...
 
void reset ()
 
bool update (double velocity)
 update internal flags based on the commanded velocity More...
 

Protected Types

enum  Sign { Sign::ZERO, Sign::POSITIVE, Sign::NEGATIVE }
 

Protected Attributes

bool negative_only_
 
bool positive_only_
 
Sign sign_
 

Detailed Description

Helper class for performing the same logic on the x,y and theta dimensions.

Definition at line 94 of file oscillation.h.

Member Enumeration Documentation

Enumerator
ZERO 
POSITIVE 
NEGATIVE 

Definition at line 122 of file oscillation.h.

Constructor & Destructor Documentation

dwb_critics::OscillationCritic::CommandTrend::CommandTrend ( )

Definition at line 48 of file oscillation.cpp.

Member Function Documentation

bool dwb_critics::OscillationCritic::CommandTrend::hasSignFlipped ( )

Check whether we are currently tracking a flipped sign.

Returns
True if the sign has flipped

Definition at line 89 of file oscillation.cpp.

bool dwb_critics::OscillationCritic::CommandTrend::isOscillating ( double  velocity)

Check to see whether the proposed velocity would be considered oscillating.

Parameters
velocitythe velocity to evaluate
Returns
true if the sign has flipped more than once

Definition at line 84 of file oscillation.cpp.

void dwb_critics::OscillationCritic::CommandTrend::reset ( )

Definition at line 53 of file oscillation.cpp.

bool dwb_critics::OscillationCritic::CommandTrend::update ( double  velocity)

update internal flags based on the commanded velocity

Parameters
velocitycommanded velocity for the dimension this trend is tracking
Returns
true if the sign has flipped

Definition at line 60 of file oscillation.cpp.

Member Data Documentation

bool dwb_critics::OscillationCritic::CommandTrend::negative_only_
protected

Definition at line 125 of file oscillation.h.

bool dwb_critics::OscillationCritic::CommandTrend::positive_only_
protected

Definition at line 125 of file oscillation.h.

Sign dwb_critics::OscillationCritic::CommandTrend::sign_
protected

Definition at line 124 of file oscillation.h.


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


dwb_critics
Author(s): David V. Lu!!
autogenerated on Sun Jan 10 2021 04:08:44