The CalibrationChecker class consumes primary packages ignoring all but KinematicsInfo packages. These are then checked against the used kinematics to see if the correct calibration is used. More...
#include <calibration_checker.h>
Public Member Functions | |
CalibrationChecker (const std::string &expected_hash) | |
Creates a new CalibrationChecker object with an expected hash calculated from the used kinematics. More... | |
bool | checkSuccessful () |
Returns whether the calibration check was successful. More... | |
virtual bool | consume (std::shared_ptr< primary_interface::PrimaryPackage > product) |
Consumes a package, checking its hash if it is a KinematicsInfo package. If the hash does not match the expected hash, an error is logged. More... | |
bool | isChecked () |
Used to make sure the calibration check is not performed several times. More... | |
virtual void | onTimeout () |
Handles timeouts. More... | |
virtual void | setupConsumer () |
Empty setup function, as no setup is needed. More... | |
virtual void | stopConsumer () |
Stops the consumer. More... | |
virtual void | teardownConsumer () |
Tears down the consumer. More... | |
virtual | ~CalibrationChecker ()=default |
Private Attributes | |
bool | checked_ |
std::string | expected_hash_ |
bool | matches_ |
The CalibrationChecker class consumes primary packages ignoring all but KinematicsInfo packages. These are then checked against the used kinematics to see if the correct calibration is used.
Definition at line 42 of file calibration_checker.h.
urcl::CalibrationChecker::CalibrationChecker | ( | const std::string & | expected_hash | ) |
Creates a new CalibrationChecker object with an expected hash calculated from the used kinematics.
expected_hash | The expected kinematics hash |
Definition at line 33 of file calibration_checker.cpp.
|
virtualdefault |
|
inline |
Returns whether the calibration check was successful.
Definition at line 105 of file calibration_checker.h.
|
virtual |
Consumes a package, checking its hash if it is a KinematicsInfo package. If the hash does not match the expected hash, an error is logged.
product | The package to consume |
Implements urcl::comm::IConsumer< primary_interface::PrimaryPackage >.
Definition at line 37 of file calibration_checker.cpp.
|
inline |
Used to make sure the calibration check is not performed several times.
Definition at line 94 of file calibration_checker.h.
|
inlinevirtual |
Handles timeouts.
Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.
Definition at line 75 of file calibration_checker.h.
|
inlinevirtual |
Empty setup function, as no setup is needed.
Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.
Definition at line 57 of file calibration_checker.h.
|
inlinevirtual |
Stops the consumer.
Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.
Definition at line 69 of file calibration_checker.h.
|
inlinevirtual |
Tears down the consumer.
Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.
Definition at line 63 of file calibration_checker.h.
|
private |
Definition at line 112 of file calibration_checker.h.
|
private |
Definition at line 111 of file calibration_checker.h.
|
private |
Definition at line 113 of file calibration_checker.h.