Gazebo Sensors

API Reference

6.8.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 IGNITION_SENSORS_DISTORTION_HH_
19 #define IGNITION_SENSORS_DISTORTION_HH_
20 
21 #include <functional>
22 #include <string>
23 #include <vector>
24 
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
virtual ~Distortion()
Destructor.
Definition: gz/sensors/AirPressureSensor.hh:31
STL class.
STL class.
virtual void Print(std::ostream &_out) const
Output information about the distortion model.
static DistortionPtr NewDistortionModel(sdf::ElementPtr _sdf, const std::string &_sensorType="")
Load a distortion model based on the input sdf parameters and sensor type.
STL class.
virtual void Load(const sdf::Camera &_sdf)
Load distortion parameters from sdf.
DistortionType
Which distortion types we support.
Definition: gz/sensors/Distortion.hh:69
Use this distortion manager for creating and loading distortion models.
Definition: gz/sensors/Distortion.hh:44
Distortion models for sensor output signals.
Definition: gz/sensors/Distortion.hh:78
DistortionType Type() const
Accessor for DistortionType.
Distortion(DistortionType _type)
Constructor. This should not be called directly unless creating an empty distortion model....