Public Member Functions | Private Attributes | List of all members
urcl::CalibrationChecker Class Reference

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>

Inheritance diagram for urcl::CalibrationChecker:
Inheritance graph
[legend]

Public Member Functions

 CalibrationChecker (const std::string &expected_hash)
 Creates a new CalibrationChecker object with an expected hash calculated from the used kinematics. 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_
 

Detailed Description

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 41 of file calibration_checker.h.

Constructor & Destructor Documentation

urcl::CalibrationChecker::CalibrationChecker ( const std::string &  expected_hash)

Creates a new CalibrationChecker object with an expected hash calculated from the used kinematics.

Parameters
expected_hashThe expected kinematics hash

Definition at line 32 of file calibration_checker.cpp.

virtual urcl::CalibrationChecker::~CalibrationChecker ( )
virtualdefault

Member Function Documentation

bool urcl::CalibrationChecker::consume ( std::shared_ptr< primary_interface::PrimaryPackage product)
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.

Parameters
productThe package to consume
Returns
True, if the package was consumed correctly

Implements urcl::comm::IConsumer< primary_interface::PrimaryPackage >.

Definition at line 36 of file calibration_checker.cpp.

bool urcl::CalibrationChecker::isChecked ( )
inline

Used to make sure the calibration check is not performed several times.

Returns
True, if the calibration was already checked, false otherwise

Definition at line 93 of file calibration_checker.h.

virtual void urcl::CalibrationChecker::onTimeout ( )
inlinevirtual

Handles timeouts.

Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.

Definition at line 74 of file calibration_checker.h.

virtual void urcl::CalibrationChecker::setupConsumer ( )
inlinevirtual

Empty setup function, as no setup is needed.

Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.

Definition at line 56 of file calibration_checker.h.

virtual void urcl::CalibrationChecker::stopConsumer ( )
inlinevirtual

Stops the consumer.

Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.

Definition at line 68 of file calibration_checker.h.

virtual void urcl::CalibrationChecker::teardownConsumer ( )
inlinevirtual

Tears down the consumer.

Reimplemented from urcl::comm::IConsumer< primary_interface::PrimaryPackage >.

Definition at line 62 of file calibration_checker.h.

Member Data Documentation

bool urcl::CalibrationChecker::checked_
private

Definition at line 100 of file calibration_checker.h.

std::string urcl::CalibrationChecker::expected_hash_
private

Definition at line 99 of file calibration_checker.h.


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


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Sun May 9 2021 02:16:26