Ignition Sensors

API Reference

6.3.0
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 IGNITION_SENSORS_DISTORTION_HH_
19 #define IGNITION_SENSORS_DISTORTION_HH_
20 
21 #include <functional>
22 #include <string>
23 #include <vector>
24 
25 #include <ignition/sensors/Export.hh>
27 #include <ignition/sensors/config.hh>
28 #include <ignition/utils/ImplPtr.hh>
29 
30 #include <sdf/sdf.hh>
31 
32 namespace ignition
33 {
34  namespace sensors
35  {
36  // Inline bracket to help doxygen filtering.
37  inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
38  // Forward declarations
39  class DistortionPrivate;
40 
44  class IGNITION_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 IGNITION_SENSORS_VISIBLE DistortionType : int
70  {
71  NONE = 0,
72  CUSTOM = 1,
73  BROWN = 2
74  };
75 
78  class IGNITION_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  IGN_UTILS_IMPL_PTR(dataPtr)
104  };
105  }
106  }
107 }
108 #endif
STL class.
DistortionType
Which distortion types we support.
Definition: Distortion.hh:69
Use this distortion manager for creating and loading distortion models.
Definition: Distortion.hh:44
Distortion models for sensor output signals.
Definition: Distortion.hh:78
Forward declarations and typedefs for sensors.
Definition: AirPressureSensor.hh:31
STL class.