5 template <
typename MessageType>
10 gridSizeX = node[itmGridSize][0].asInt();
11 gridSizeY = node[itmGridSize][1].asInt();
14 template <
typename MessageType>
17 thickness = message.thickness;
18 gridSpacing = message.grid_spacing;
19 gridSizeX = message.grid_size_x;
20 gridSizeY = message.grid_size_y;
23 template <
typename MessageType>
26 thickness = message.thickness;
27 gridSpacing = message.grid_spacing;
28 gridSizeX = message.grid_size_x;
29 gridSizeY = message.grid_size_y;
32 template <
typename MessageType>
35 message.thickness = thickness;
36 message.grid_spacing = gridSpacing;
37 message.grid_size_x = gridSizeX;
38 message.grid_size_y = gridSizeY;
41 template <
typename MessageType>
46 node[itmPattern][itmGridSize][0] = gridSizeX;
47 node[itmPattern][itmGridSize][1] = gridSizeY;
50 template <
typename MessageType>
54 rosMsg.grid_size_x = gridSizeX;
55 rosMsg.grid_size_y = gridSizeY;
56 rosMsg.grid_spacing = gridSpacing;
57 rosMsg.thickness = thickness;
74 points.insert(
points.begin(), message.points.begin(), message.points.end());
81 message.points.clear();
82 message.points.insert(message.points.begin(),
points.begin(),
points.end());
88 for (
size_t i = 0; i <
points.size(); i++)
90 node[itmPoints][i][0] =
points[i].x;
91 node[itmPoints][i][1] =
points[i].y;
99 for (
auto const& point :
points)
101 rosMonoPattern.points.push_back(point);
104 return rosMonoPattern;
115 leftPoints.insert(leftPoints.begin(), message.left_points.begin(), message.left_points.end());
117 rightPoints.insert(rightPoints.begin(), message.right_points.begin(), message.right_points.end());
123 auto&
points = leftPoints;
129 for (
size_t i = 0; i <
points.size(); i++)
131 node[itmPoints][i][0] =
points[i].x;
132 node[itmPoints][i][1] =
points[i].y;
152 rosStereoPattern.left_points.push_back(point);
156 rosStereoPattern.right_points.push_back(point);
159 return rosStereoPattern;
std::vector< ensenso::msg::ImagePoint > rightPoints
void writeToNxLib(NxLibItem const &node, bool right=false)
std::vector< ensenso::msg::ImagePoint > points
void readFromMessage(ensenso::msg::StereoCalibrationPattern const &message)
void readFromMessage(ensenso::msg::MonoCalibrationPattern const &message)
StereoCalibrationPattern(NxLibItem const &node)
CalibrationPattern(MessageType const &message)
void writeToMessage(ensenso::msg::MonoCalibrationPattern &message)
ensenso::msg::MonoCalibrationPattern toRosMsg() const
ensenso::msg::StereoCalibrationPattern toRosMsg() const
MonoCalibrationPattern(NxLibItem const &node)
std::vector< ensenso::msg::ImagePoint > leftPoints
MessageType toRosMessage() const
const int conversionFactor
void writeToNxLib(NxLibItem const &node)
void writeMetaDataToNxLib(NxLibItem const &node)
void writeMetaDataToMessage(MessageType &message)
void readMetaDataFromMessage(MessageType const &message)
void writeToMessage(ensenso::msg::StereoCalibrationPattern &message) const