Gazebo Sensors

API Reference

7.3.1
gz/sensors/Distortion.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef GZ_SENSORS_DISTORTION_HH_
19 #define GZ_SENSORS_DISTORTION_HH_
20 
21 #include <functional>
22 #include <string>
23 #include <vector>
24 
25 #include <gz/sensors/Export.hh>
27 #include <gz/sensors/config.hh>
28 #include <gz/utils/ImplPtr.hh>
29 
30 #include <sdf/sdf.hh>
31 
32 namespace gz
33 {
34  namespace sensors
35  {
36  // Inline bracket to help doxygen filtering.
37  inline namespace GZ_SENSORS_VERSION_NAMESPACE {
38  // Forward declarations
39  class DistortionPrivate;
40 
44  class GZ_SENSORS_VISIBLE DistortionFactory
45  {
53  public: static DistortionPtr NewDistortionModel(sdf::ElementPtr _sdf,
54  const std::string &_sensorType = "");
55 
63  public: static DistortionPtr NewDistortionModel(
64  const sdf::Camera &_sdf,
65  const std::string &_sensorType = "");
66  };
67 
69  enum class GZ_SENSORS_VISIBLE DistortionType : int
70  {
71  NONE = 0,
72  CUSTOM = 1,
73  BROWN = 2
74  };
75 
78  class GZ_SENSORS_VISIBLE Distortion
79  {
85  public: explicit Distortion(DistortionType _type);
86 
88  public: virtual ~Distortion();
89 
92  public: virtual void Load(const sdf::Camera &_sdf);
93 
96  public: DistortionType Type() const;
97 
100  public: virtual void Print(std::ostream &_out) const;
101 
103  GZ_UTILS_IMPL_PTR(dataPtr)
104  };
105  }
106  }
107 }
108 #endif