calibration_checker.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // Copyright 2019 FZI Forschungszentrum Informatik
5 // Created on behalf of Universal Robots A/S
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 // -- END LICENSE BLOCK ------------------------------------------------
19 
20 //----------------------------------------------------------------------
27 //----------------------------------------------------------------------
28 #ifndef UR_CLIENT_LIBRARY_UR_CALIBRATION_CHECKER_H_INCLUDED
29 #define UR_CLIENT_LIBRARY_UR_CALIBRATION_CHECKER_H_INCLUDED
30 
32 
34 
35 namespace urcl
36 {
42 class [[deprecated("Using the standalone CalibrationChecker consumer to compare the kinematics hash is deprecated. "
43  "Please use the PrimaryClient instead.")]] CalibrationChecker
44  : public comm::IConsumer<primary_interface::PrimaryPackage>
45 {
46 public:
53  CalibrationChecker(const std::string& expected_hash);
54  virtual ~CalibrationChecker() = default;
55 
59  virtual void setupConsumer()
60  {
61  }
65  virtual void teardownConsumer()
66  {
67  }
71  virtual void stopConsumer()
72  {
73  }
77  virtual void onTimeout()
78  {
79  }
80 
89  virtual bool consume(std::shared_ptr<primary_interface::PrimaryPackage> product);
90 
96  bool isChecked()
97  {
98  return checked_;
99  }
100 
108  {
109  return matches_;
110  }
111 
112 private:
113  std::string expected_hash_;
114  bool checked_;
115  bool matches_;
116 };
117 } // namespace urcl
118 
119 #endif // ifndef UR_CLIENT_LIBRARY_UR_CALIBRATION_CHECKER_H_INCLUDED
pipeline.h
urcl::CalibrationChecker::stopConsumer
virtual void stopConsumer()
Stops the consumer.
Definition: calibration_checker.h:71
urcl::CalibrationChecker::checkSuccessful
bool checkSuccessful()
Returns whether the calibration check was successful.
Definition: calibration_checker.h:107
urcl::CalibrationChecker
The CalibrationChecker class consumes primary packages ignoring all but KinematicsInfo packages....
Definition: calibration_checker.h:42
urcl
Definition: bin_parser.h:36
urcl::CalibrationChecker::setupConsumer
virtual void setupConsumer()
Empty setup function, as no setup is needed.
Definition: calibration_checker.h:59
kinematics_info.h
urcl::CalibrationChecker::isChecked
bool isChecked()
Used to make sure the calibration check is not performed several times.
Definition: calibration_checker.h:96
urcl::CalibrationChecker::matches_
bool matches_
Definition: calibration_checker.h:115
urcl::comm::IConsumer
Parent class for for arbitrary consumers.
Definition: pipeline.h:45
urcl::CalibrationChecker::checked_
bool checked_
Definition: calibration_checker.h:114
urcl::CalibrationChecker::expected_hash_
std::string expected_hash_
Definition: calibration_checker.h:113
urcl::CalibrationChecker::onTimeout
virtual void onTimeout()
Handles timeouts.
Definition: calibration_checker.h:77
urcl::CalibrationChecker::teardownConsumer
virtual void teardownConsumer()
Tears down the consumer.
Definition: calibration_checker.h:65


ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Mon May 26 2025 02:35:58