All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GaussianNoiseModel.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 _GAZEBO_GAUSSIAN_NOISE_MODEL_HH_
19 #define _GAZEBO_GAUSSIAN_NOISE_MODEL_HH_
20 
21 #include <vector>
22 #include <string>
23 
24 #include <sdf/sdf.hh>
25 
27 #include "gazebo/sensors/Noise.hh"
28 #include "gazebo/util/system.hh"
29 
30 namespace Ogre
31 {
32  class CompositorInstance;
33 }
34 
35 namespace gazebo
36 {
37  class GaussianNoiseCompositorListener;
38 
39  namespace sensors
40  {
44  {
46  public: GaussianNoiseModel();
47 
49  public: virtual ~GaussianNoiseModel();
50 
51  // Documentation inherited.
52  public: virtual void Load(sdf::ElementPtr _sdf);
53 
54  // Documentation inherited.
55  public: virtual void Fini();
56 
57  // Documentation inherited.
58  public: double ApplyImpl(double _in);
59 
62  public: double GetMean() const;
63 
66  public: double GetStdDev() const;
67 
70  public: double GetBias() const;
71 
74  protected: double mean;
75 
78  protected: double stdDev;
79 
81  protected: double bias;
82 
85  protected: double precision;
86 
88  protected: bool quantized;
89  };
90 
94  {
96  public: ImageGaussianNoiseModel();
97 
99  public: virtual ~ImageGaussianNoiseModel();
100 
101  // Documentation inherited.
102  public: virtual void Load(sdf::ElementPtr _sdf);
103 
104  // Documentation inherited.
105  public: virtual void Fini();
106 
107  // Documentation inherited.
108  public: virtual void SetCamera(rendering::CameraPtr _camera);
109 
111  public: Ogre::CompositorInstance *gaussianNoiseInstance;
112 
114  public: boost::shared_ptr<GaussianNoiseCompositorListener>
116  };
118  }
119 }
120 
121 #endif