|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <setpoint_continuous_jam_checker.hpp>
Public Member Functions | |
| SetpointContinuousJamChecker (SetpointSubsystem *setpointSubsystem, float distanceTolerance, uint32_t temporalTolerance) | |
| void | restart () |
| bool | check () |
| float | getJamSetpointTolerance () const |
A functor (function object) to be used for setpoint subsystem jam detection.
Uses a conditional timeout to continuously check if the subsystem's current position is within an acceptable range of the desired position. If it is outside of the acceptable range for too long then the timeout times out and the subsystem is considered jammed.
|
inline |
| [in] | setpointSubsystem | the setpoint subsystem to do jam checking on. |
| [in] | distanceTolerance | the acceptable distance between the setpoint and current position. |
| [in] | temporalTolerance | the maximum amount of time the distance can be greater than the distance tolerance before the system is considered jammed. |
|
inline |
Update subsystem jam detection and check whether subsystem is jammed. If subsystem is within distance tolerance of desired value then timer is reset, even if at the time of call it would have expired, as being within tolerance is checked first.
true if subsystem is jammed, false otherwise
|
inline |
|
inline |
Resets the jam timer