Class CalibrationChecker
Defined in File calibration_checker.h
Inheritance Relationships
Base Type
public urcl::comm::IConsumer< primary_interface::PrimaryPackage >
(Template Class IConsumer)
Class Documentation
-
class CalibrationChecker : public urcl::comm::IConsumer<primary_interface::PrimaryPackage>
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.
Public Functions
-
CalibrationChecker(const std::string &expected_hash)
Creates a new CalibrationChecker object with an expected hash calculated from the used kinematics.
- Parameters:
expected_hash – The expected kinematics hash
-
virtual ~CalibrationChecker() = default
-
inline virtual void setupConsumer()
Empty setup function, as no setup is needed.
-
inline virtual void teardownConsumer()
Tears down the consumer.
-
inline virtual void stopConsumer()
Stops the consumer.
-
inline virtual void onTimeout()
Handles timeouts.
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.
- Parameters:
product – The package to consume
- Returns:
True, if the package was consumed correctly
-
inline bool isChecked()
Used to make sure the calibration check is not performed several times.
- Returns:
True, if the calibration was already checked, false otherwise
-
inline bool checkSuccessful()
Returns whether the calibration check was successful.
- Returns:
True if the robot’s calibration checksum matches the one given to the checker. False if it doesn’t match or the check was not yet performed.
-
CalibrationChecker(const std::string &expected_hash)