YARP
Yet Another Robot Platform
RGBDSensorParamParser.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #include <vector>
10 
11 #include <yarp/os/Searchable.h>
12 #include <yarp/os/Value.h>
13 #include <yarp/sig/Matrix.h>
15 #include <yarp/dev/api.h>
16 
17 #ifndef YARP_DEV_RGBDSENSORPARAMPARSER_H
18 #define YARP_DEV_RGBDSENSORPARAMPARSER_H
19 
20 namespace yarp {
21 namespace dev {
22 
28 {
29 public:
30 
31 #ifndef YARP_NO_DEPRECATED // Since YARP 3.2.0
32  YARP_DEPRECATED_TYPEDEF_MSG("Use yarp::sig::IntrinsicParams instead") yarp::sig::IntrinsicParams IntrinsicParams;
33 #endif
34 
40  {
44  RGBDParam() : name("unknown"), isSetting(false), isDescription(false), size(1)
45  {
46  val.resize(size);
47  }
48 
54  RGBDParam(const std::string& _name, const int _size) : name(_name), isSetting(false),
55  isDescription(false), size(_size)
56  {
57  val.resize(size);
58  }
59 
60 
62  bool isSetting;
64  size_t size;
65 
66  YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(std::vector<yarp::os::Value>) val;
67  };
68 
69 
73  RGBDSensorParamParser(): depthIntrinsic(), rgbIntrinsic(),
74  transformationMatrix(4,4), isOptionalExtrinsic(true) {
75  transformationMatrix.eye();
76  }
77 
85  bool parseParam(const yarp::os::Searchable& config, std::vector<RGBDParam *> &params);
86 
91 };
92 
93 } // dev
94 } // yarp
95 
96 #endif
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
yarp::dev::RGBDSensorParamParser::RGBDParam::name
std::string name
Definition: RGBDSensorParamParser.h:61
IntrinsicParams.h
YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)
Suppress MSVC C4251 warning for the declaration.
Definition: system.h:339
yarp::dev::RGBDSensorParamParser::RGBDParam::isDescription
bool isDescription
Definition: RGBDSensorParamParser.h:63
Matrix.h
contains the definition of a Matrix type
Searchable.h
yarp::dev::RGBDSensorParamParser::RGBDParam::val
std::vector< yarp::os::Value > val
Definition: RGBDSensorParamParser.h:66
yarp::dev::RGBDSensorParamParser::transformationMatrix
yarp::sig::Matrix transformationMatrix
Definition: RGBDSensorParamParser.h:89
yarp::dev::RGBDSensorParamParser::RGBDParam::size
size_t size
Definition: RGBDSensorParamParser.h:64
yarp::dev::RGBDSensorParamParser::RGBDParam::isSetting
bool isSetting
Definition: RGBDSensorParamParser.h:62
yarp::dev::RGBDSensorParamParser::depthIntrinsic
yarp::sig::IntrinsicParams depthIntrinsic
Definition: RGBDSensorParamParser.h:87
yarp::dev::RGBDSensorParamParser::RGBDSensorParamParser
RGBDSensorParamParser()
RGBDSensorParamParser, default constructor.
Definition: RGBDSensorParamParser.h:73
yarp::dev::RGBDSensorParamParser::RGBDParam
The RGBDParam struct.
Definition: RGBDSensorParamParser.h:40
yarp::dev::RGBDSensorParamParser::rgbIntrinsic
yarp::sig::IntrinsicParams rgbIntrinsic
Definition: RGBDSensorParamParser.h:88
yarp::dev::RGBDSensorParamParser::isOptionalExtrinsic
bool isOptionalExtrinsic
Definition: RGBDSensorParamParser.h:90
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
yarp::dev::RGBDSensorParamParser
The RGBDSensorParamParser class.
Definition: RGBDSensorParamParser.h:28
YARP_DEPRECATED_TYPEDEF_MSG
#define YARP_DEPRECATED_TYPEDEF_MSG(x)
Definition: api.h:102
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::dev::RGBDSensorParamParser::RGBDParam::RGBDParam
RGBDParam(const std::string &_name, const int _size)
RGBDParam.
Definition: RGBDSensorParamParser.h:54
api.h
yarp::sig::IntrinsicParams
The IntrinsicParams struct to handle the intrinsic parameter of cameras(RGB and RGBD either).
Definition: IntrinsicParams.h:44
yarp::dev::RGBDSensorParamParser::RGBDParam::RGBDParam
RGBDParam()
RGBDParam, default constructor.
Definition: RGBDSensorParamParser.h:44
Value.h
yarp::sig::Matrix
A class for a Matrix.
Definition: Matrix.h:46