calibration_pattern.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "ensenso_camera_msgs/StereoCalibrationPattern.h"
4 #include "ensenso_camera_msgs/MonoCalibrationPattern.h"
5 #include "ensenso_camera_msgs/ImagePoint.h"
6 
7 #include <vector>
8 
9 #include "nxLib.h"
10 
11 template <typename MessageType>
13 {
14 public:
15  double thickness = 0;
16  int gridSizeX = 0;
17  int gridSizeY = 0;
18  double gridSpacing = 0;
19 
20 protected:
21  explicit CalibrationPattern(MessageType const& message);
22  explicit CalibrationPattern(NxLibItem const& node);
23 
24  void readMetaDataFromMessage(MessageType const& message);
25  void writeMetaDataToMessage(MessageType& message);
26  void writeMetaDataToNxLib(NxLibItem const& node);
27  MessageType toRosMessage() const;
28 };
29 
30 class MonoCalibrationPattern : CalibrationPattern<ensenso_camera_msgs::MonoCalibrationPattern>
31 {
32 public:
33  std::vector<ensenso_camera_msgs::ImagePoint> points;
34 
35 public:
36  explicit MonoCalibrationPattern(NxLibItem const& node);
37  explicit MonoCalibrationPattern(ensenso_camera_msgs::MonoCalibrationPattern const& message);
38 
39  void readFromMessage(ensenso_camera_msgs::MonoCalibrationPattern const& message);
40  void writeToMessage(ensenso_camera_msgs::MonoCalibrationPattern& message);
41  void writeToNxLib(NxLibItem const& node);
42  ensenso_camera_msgs::MonoCalibrationPattern toRosMsg() const;
43 };
44 
45 class StereoCalibrationPattern : CalibrationPattern<ensenso_camera_msgs::StereoCalibrationPattern>
46 {
47 public:
48  std::vector<ensenso_camera_msgs::ImagePoint> leftPoints;
49  std::vector<ensenso_camera_msgs::ImagePoint> rightPoints;
50 
51 public:
52  explicit StereoCalibrationPattern(NxLibItem const& node);
53  explicit StereoCalibrationPattern(ensenso_camera_msgs::StereoCalibrationPattern const& message);
54 
55  void writeToMessage(ensenso_camera_msgs::StereoCalibrationPattern& message) const;
56  void readFromMessage(ensenso_camera_msgs::StereoCalibrationPattern const& message);
57  void writeToNxLib(NxLibItem const& node, bool right = false);
58  ensenso_camera_msgs::StereoCalibrationPattern toRosMsg() const;
59 };
CalibrationPattern(MessageType const &message)
MessageType toRosMessage() const
std::vector< ensenso_camera_msgs::ImagePoint > leftPoints
std::vector< ensenso_camera_msgs::ImagePoint > rightPoints
std::vector< ensenso_camera_msgs::ImagePoint > points
void writeMetaDataToNxLib(NxLibItem const &node)
void writeMetaDataToMessage(MessageType &message)
void readMetaDataFromMessage(MessageType const &message)


ensenso_camera
Author(s): Ensenso
autogenerated on Thu May 6 2021 02:50:06