CARLA
 
载入中...
搜索中...
未找到
CameraInfo.h
浏览该文件的文档.
1// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*!
16 * @file CameraInfo.h
17 * This header file contains the declaration of the described types in the IDL file.
18 *
19 * This file was generated by the tool gen.
20 */
21
22#ifndef _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_CAMERAINFO_H_
23#define _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_CAMERAINFO_H_
24
25#include "RegionOfInterest.h"
26#include "Header.h"
27// 头文件,用于定义感兴趣区域和消息头
28#include <fastrtps/utils/fixed_size_string.hpp>// 用于固定大小的字符串
29#include <stdint.h>
30// 包含必要的标准库头文件
31#include <array>
32#include <string>
33#include <vector>
34#include <map>
35#include <bitset>
36
37#if defined(_WIN32)
38#if defined(EPROSIMA_USER_DLL_EXPORT)
39#define eProsima_user_DllExport __declspec( dllexport ) // 导出宏
40#else
41#define eProsima_user_DllExport
42#endif // EPROSIMA_USER_DLL_EXPORT
43#else
44#define eProsima_user_DllExport
45#endif // _WIN32
46
47#if defined(_WIN32)
48#if defined(EPROSIMA_USER_DLL_EXPORT)
49#if defined(CAMERAINFO_SOURCE)
50#define CAMERAINFO_DllAPI __declspec( dllexport ) // 当定义源时,导出符号
51#else
52#define CAMERAINFO_DllAPI __declspec( dllimport ) // 当使用时,导入符号
53#endif // CAMERAINFO_SOURCE
54#else
55#define CAMERAINFO_DllAPI
56#endif // EPROSIMA_USER_DLL_EXPORT
57#else
58#define CAMERAINFO_DllAPI
59#endif // _WIN32
60
61// 命名空间定义
62namespace eprosima {
63namespace fastcdr {
64class Cdr; // 前向声明,用于序列化与反序列化
65} // namespace fastcdr
66} // namespace eprosima
67
68namespace sensor_msgs {
69 namespace msg {
70 /*!
71 * @brief This class represents the structure CameraInfo defined by the user in the IDL file.(表示 IDL 文件中定义的 CameraInfo 结构)
72 * @ingroup CameraInfo
73 */
75 {
76 public:
77
78 /*!
79 * @brief 默认构造函数,初始化相机的基本参数。
80 * @param height 图像高度(默认为 0)
81 * @param width 图像宽度(默认为 0)
82 * @param fov 视场角(默认为 0.0)
83 */
84 eProsima_user_DllExport CameraInfo(uint32_t height = 0, uint32_t width = 0, double fov = 0.0);
85
86 /*!
87 * @brief Default destructor.(默认析构函数)
88 */
90
91 /*!
92 * @brief Copy constructor.(拷贝构造函数)
93 * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.
94 */
96 const CameraInfo& x);
97
98 /*!
99 * @brief Move constructor.(移动构造函数)
100 * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.(要移动的 CameraInfo 对象)
101 */
103 CameraInfo&& x) noexcept;
104
105 /*!
106 * @brief Copy assignment.(赋值运算符重载)
107 * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.(要赋值的 CameraInfo 对象)
108 */
110 const CameraInfo& x);
111
112 /*!
113 * @brief Move assignment.(移动赋值运算符重载)
114 * @param x Reference to the object sensor_msgs::msg::CameraInfo that will be copied.(要移动赋值的 CameraInfo 对象)
115 */
117 CameraInfo&& x) noexcept;
118
119 /*!
120 * @brief Comparison operator.()(比较运算符重载:判断两个 CameraInfo 对象是否相等)
121 * @param x sensor_msgs::msg::CameraInfo object to compare.(要比较的 CameraInfo 对象)
122 */
124 const CameraInfo& x) const;
125
126 /*!
127 * @brief Comparison operator.(比较运算符重载:判断两个 CameraInfo 对象是否不相等)
128 * @param x sensor_msgs::msg::CameraInfo object to compare.()(要比较的 CameraInfo 对象)
129 */
131 const CameraInfo& x) const;
132
133 /*!
134 * @brief This function copies the value in member header()(设置 header 成员变量的值)
135 * @param _header New value to be copied in member header(新的 Header 对象)
136 */
138 const std_msgs::msg::Header& _header);
139
140 /*!
141 * @brief This function moves the value in member header(移动赋值 header 成员变量)
142 * @param _header New value to be moved in member header(新的 Header 对象)
143 */
145 std_msgs::msg::Header&& _header);
146
147 /*!
148 * @brief This function returns a constant reference to member header(获取 header 的常量引用)
149 * @return Constant reference to member header(Header 的常量引用)
150 */
151 eProsima_user_DllExport const std_msgs::msg::Header& header() const;
152
153 /*!
154 * @brief This function returns a reference to member header(获取 header 的引用)
155 * @return Reference to member header(Header 的引用)
156 */
157 eProsima_user_DllExport std_msgs::msg::Header& header();
158 /*!
159 * @brief This function sets a value in member height(设置图像高度(height))
160 * @param _height New value for member height(新的高度值)
161 */
163 uint32_t _height);
164
165 /*!
166 * @brief This function returns the value of member height(获取图像高度的值)
167 * @return Value of member height(图像高度)
168 */
169 eProsima_user_DllExport uint32_t height() const;
170
171 /*!
172 * @brief This function returns a reference to member height(获取图像高度的引用)
173 * @return Reference to member height()(图像高度的引用)
174 */
176
177 /*!
178 * @brief This function sets a value in member width(设置图像宽度(width))
179 * @param _width New value for member width(新的宽度值)
180 */
182 uint32_t _width);
183
184 /*!
185 * @brief This function returns the value of member width(获取图像宽度的值)
186 * @return Value of member width(图像宽度)
187 */
188 eProsima_user_DllExport uint32_t width() const;
189
190 /*!
191 * @brief This function returns a reference to member width( 获取图像宽度的引用)
192 * @return Reference to member width(图像宽度的引用)
193 */
194 eProsima_user_DllExport uint32_t& width();
195
196 /*!
197 * @brief This function copies the value in member distortion_model(设置畸变模型(distortion_model))
198 * @param _distortion_model New value to be copied in member distortion_model(新的畸变模型字符串)
199 */
201 const std::string& _distortion_model);
202
203 /*!
204 * @brief This function moves the value in member distortion_model(移动赋值畸变模型)
205 * @param _distortion_model New value to be moved in member distortion_model(新的畸变模型字符串)
206 */
208 std::string&& _distortion_model);
209
210 /*!
211 * @brief This function returns a constant reference to member distortion_model(获取畸变模型的常量引用)
212 * @return Constant reference to member distortion_model(畸变模型字符串的常量引用)
213 */
214 eProsima_user_DllExport const std::string& distortion_model() const;
215
216 /*!
217 * @brief This function returns a reference to member distortion_model()(获取畸变模型的引用)
218 * @return Reference to member distortion_model(畸变模型字符串的引用)
219 */
221 /*!
222 * @brief This function copies the value in member D(设置畸变参数 D(Distortion Coefficients)
223 * @param _D New value to be copied in member D(新的畸变系数向量)
224 */
226 const std::vector<double>& _D);
227
228 /*!
229 * @brief This function moves the value in member D(移动赋值畸变参数 D)
230 * @param _D New value to be moved in member D)(新的畸变系数向量)
231 */
233 std::vector<double>&& _D);
234
235 /*!
236 * @brief This function returns a constant reference to member D(获取成员变量 D 的常量引用)
237 * @return Constant reference to member D(成员变量 D 的常量引用)
238 */
239 eProsima_user_DllExport const std::vector<double>& D() const;
240
241 /*!
242 * @brief This function returns a reference to member D(获取成员变量 D 的引用)
243 * @return Reference to member D(成员变量 D 的引用)
244 */
245 eProsima_user_DllExport std::vector<double>& D();
246 /*!
247 * @brief This function copies the value in member K(将新值拷贝到成员变量 K 中)
248 * @param _K New value to be copied in member K(要拷贝到成员变量 K 中的新值)
249 */
251 const std::array<double, 9>& _k);
252
253 /*!
254 * @brief This function moves the value in member k(新值移动到成员变量 K 中)
255 * @param _k New value to be moved in member k(要移动到成员变量 K 中的新值)
256 */
258 std::array<double, 9>&& _k);
259
260 /*!
261 * @brief This function returns a constant reference to member k(获取成员变量 K 的常量引用)
262 * @return Constant reference to member k()(成员变量 K 的常量引用)
263 */
264 eProsima_user_DllExport const std::array<double, 9>& k() const;
265
266 /*!
267 * @brief This function returns a reference to member k(获取成员变量 K 的引用)
268 * @return Reference to member k(成员变量 K 的引用)
269 */
270 eProsima_user_DllExport std::array<double, 9>& k();
271 /*!
272 * @brief This function copies the value in member r(将新值拷贝到成员变量 R 中)
273 * @param _r New value to be copied in member r(要拷贝到成员变量 R 中的新值)
274 */
276 const std::array<double, 9>& _r);
277
278 /*!
279 * @brief This function moves the value in member r(将新值移动到成员变量 R 中)
280 * @param _r New value to be moved in member r(要移动到成员变量 R 中的新值)
281 */
283 std::array<double, 9>&& _r);
284
285 /*!
286 * @brief This function returns a constant reference to member r(获取成员变量 R 的常量引用)
287 * @return Constant reference to member r(成员变量 R 的常量引用)
288 */
289 eProsima_user_DllExport const std::array<double, 9>& r() const;
290
291 /*!
292 * @brief This function returns a reference to member r(获取成员变量 R 的引用)
293 * @return Reference to member r( 成员变量 R 的引用)
294 */
295 eProsima_user_DllExport std::array<double, 9>& r();
296 /*!
297 * @brief This function copies the value in member p
298 * @param _p New value to be copied in member p
299 */
301 const std::array<double, 12>& _p);
302
303 /*!
304 * @brief This function moves the value in member p(将新值拷贝到成员变量 P 中)
305 * @param _p New value to be moved in member p(要拷贝到成员变量 P 中的新值)
306 */
308 std::array<double, 12>&& _p);
309
310 /*!
311 * @brief This function returns a constant reference to member p(将新值移动到成员变量 P 中)
312 * @return Constant reference to member p(要移动到成员变量 P 中的新值)
313 */
314 eProsima_user_DllExport const std::array<double, 12>& p() const;
315
316 /*!
317 * @brief This function returns a reference to member p(获取成员变量 P 的常量引用)
318 * @return Reference to member p(成员变量 P 的常量引用)
319 */
320 eProsima_user_DllExport std::array<double, 12>& p();
321 /*!
322 * @brief This function sets a value in member binning_x(获取成员变量 P 的引用)
323 * @param _binning_x New value for member binning_x(成员变量 P 的引用)
324 */
326 uint32_t _binning_x);
327
328 /*!
329 * @brief This function returns the value of member binning_x(设置成员变量 binning_x 的值)
330 * @return Value of member binning_x(新的 binning_x 值)
331 */
332 eProsima_user_DllExport uint32_t binning_x() const;
333
334 /*!
335 * @brief This function returns a reference to member binning_x(获取成员变量 binning_x 的值)
336 * @return Reference to member binning_x(成员变量 binning_x 的值)
337 */
339
340 /*!
341 * @brief This function sets a value in member binning_y(设置成员变量 binning_y 的值)
342 * @param _binning_y New value for member binning_y(新的 binning_y 值)
343 */
345 uint32_t _binning_y);
346
347 /*!
348 * @brief This function returns the value of member binning_y(获取成员变量 binning_y 的值)
349 * @return Value of member binning_y(成员变量 binning_y 的值)
350 */
351 eProsima_user_DllExport uint32_t binning_y() const;
352
353 /*!
354 * @brief This function returns a reference to member binning_y(获取成员变量 binning_y 的引用)
355 * @return Reference to member binning_y(成员变量 binning_y 的引用)
356 */
358
359 /*!
360 * @brief This function copies the value in member roi(将新值拷贝到成员变量 roi 中)
361 * @param _roi New value to be copied in member roi(要拷贝到成员变量 roi 中的新值)
362 */
365
366 /*!
367 * @brief This function moves the value in member roi(将新值移动到成员变量 roi 中)
368 * @param _roi New value to be moved in member roi(要移动到成员变量 roi 中的新值)
369 */
372
373 /*!
374 * @brief This function returns a constant reference to member roi(获取成员变量 roi 的常量引用)
375 * @return Constant reference to member roi(成员变量 roi 的常量引用)
376 */
378
379 /*!
380 * @brief This function returns a reference to member roi(获取成员变量 roi 的引用)
381 * @return Reference to member roi(成员变量 roi 的引用)
382 */
384
385 /*!
386 * @brief This function returns the maximum serialized size of an object(获取对象在特定对齐下的最大序列化大小)
387 * depending on the buffer alignment.
388 * @param current_alignment Buffer alignment.(当前对齐方式)
389 * @return Maximum serialized size.(最大序列化大小)
390 */
392 size_t current_alignment = 0);
393
394 /*!
395 * @brief This function returns the serialized size of a data depending on the buffer alignment.(获取数据在特定对齐下的序列化大小)
396 * @param data Data which is calculated its serialized size.(要计算序列化大小的数据)
397 * @param current_alignment Buffer alignment.(当前对齐方式)
398 * @return Serialized size.(序列化大小)
399 */
402 size_t current_alignment = 0);
403
404 /*!
405 * @brief This function serializes an object using CDR serialization.(使用 CDR 序列化一个对象)
406 * @param cdr CDR serialization object.(序列化对象)
407 */
409 eprosima::fastcdr::Cdr& cdr) const;
410
411 /*!
412 * @brief This function deserializes an object using CDR serialization.(反序列化一个对象)
413 * @param cdr CDR serialization object.(序列化对象)
414 */
416 eprosima::fastcdr::Cdr& cdr);
417
418 /*!
419 * @brief This function returns the maximum serialized size of the Key of an object(在特定对齐下的最大序列化大小)
420 * depending on the buffer alignment.
421 * @param current_alignment Buffer alignment.(当前对齐方式。)
422 * @return Maximum serialized size.(最大序列化大小)
423 */
425 size_t current_alignment = 0);
426
427 /*!
428 * @brief 判断是否为此类型定义了 Key。
429 * @return 如果定义了 Key,则返回 true;否则返回 false。
430 */
432
433 /*!
434 * @brief This function serializes the key members of an object using CDR serialization.(使用 CDR 序列化对象的 Key 成员)
435 * @param cdr CDR serialization object.(序列化对象)
436 */
438 eprosima::fastcdr::Cdr& cdr) const;
439
440 private:
441 std_msgs::msg::Header m_header;
442 uint32_t m_height;
443 uint32_t m_width;
445 std::vector<double> m_d;
446 std::array<double, 9> m_k;
447 std::array<double, 9> m_r;
448 std::array<double, 12> m_p;
449 uint32_t m_binning_x;
450 uint32_t m_binning_y;
452 };
453 } // namespace msg
454} // namespace sensor_msgs
455
456#endif // _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_CAMERAINFO_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
This class represents the structure CameraInfo defined by the user in the IDL file....
Definition CameraInfo.h:75
std::array< double, 12 > m_p
Definition CameraInfo.h:448
std_msgs::msg::Header m_header
Definition CameraInfo.h:441
static eProsima_user_DllExport bool isKeyDefined()
判断是否为此类型定义了 Key。
std::array< double, 9 > m_r
Definition CameraInfo.h:447
eProsima_user_DllExport const std::array< double, 9 > & r() const
This function returns a constant reference to member r(获取成员变量 R 的常量引用)
eProsima_user_DllExport const sensor_msgs::msg::RegionOfInterest & roi() const
This function returns a constant reference to member roi(获取成员变量 roi 的常量引用)
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.(反序列化一个对象)
eProsima_user_DllExport bool operator==(const CameraInfo &x) const
Comparison operator.()(比较运算符重载:判断两个 CameraInfo 对象是否相等)
eProsima_user_DllExport CameraInfo(uint32_t height=0, uint32_t width=0, double fov=0.0)
默认构造函数,初始化相机的基本参数。
eProsima_user_DllExport bool operator!=(const CameraInfo &x) const
Comparison operator.(比较运算符重载:判断两个 CameraInfo 对象是否不相等)
std::vector< double > m_d
Definition CameraInfo.h:445
eProsima_user_DllExport uint32_t binning_y() const
This function returns the value of member binning_y(获取成员变量 binning_y 的值)
eProsima_user_DllExport const std::array< double, 12 > & p() const
This function returns a constant reference to member p(将新值移动到成员变量 P 中)
eProsima_user_DllExport uint32_t width() const
This function returns the value of member width(获取图像宽度的值)
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.(使用 CDR 序列化一个对象)
eProsima_user_DllExport CameraInfo & operator=(const CameraInfo &x)
Copy assignment.(赋值运算符重载)
eProsima_user_DllExport const std_msgs::msg::Header & header() const
This function returns a constant reference to member header(获取 header 的常量引用)
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.(使用 CDR 序列化对象的 Key 成员)
eProsima_user_DllExport const std::vector< double > & D() const
This function returns a constant reference to member D(获取成员变量 D 的常量引用)
eProsima_user_DllExport uint32_t binning_x() const
This function returns the value of member binning_x(设置成员变量 binning_x 的值)
eProsima_user_DllExport uint32_t height() const
This function returns the value of member height(获取图像高度的值)
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object(在特定对齐下的最大序列化大小) depending o...
sensor_msgs::msg::RegionOfInterest m_roi
Definition CameraInfo.h:451
static eProsima_user_DllExport size_t getMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of an object(获取对象在特定对齐下的最大序列化大小) depending on the b...
std::array< double, 9 > m_k
Definition CameraInfo.h:446
eProsima_user_DllExport const std::string & distortion_model() const
This function returns a constant reference to member distortion_model(获取畸变模型的常量引用)
eProsima_user_DllExport ~CameraInfo()
Default destructor.(默认析构函数)
eProsima_user_DllExport const std::array< double, 9 > & k() const
This function returns a constant reference to member k(获取成员变量 K 的常量引用)
static eProsima_user_DllExport size_t getCdrSerializedSize(const sensor_msgs::msg::CameraInfo &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment....
This class represents the structure RegionOfInterest defined by the user in the IDL file.