All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Noise.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_NOISE_HH_
19 #define _GAZEBO_NOISE_HH_
20 
21 #include <vector>
22 #include <string>
23 
24 #include <sdf/sdf.hh>
25 
28 #include "gazebo/util/system.hh"
29 
30 namespace gazebo
31 {
32  namespace sensors
33  {
36 
40  {
48  public: static NoisePtr NewNoiseModel(sdf::ElementPtr _sdf,
49  const std::string &_sensorType = "");
50  };
51 
55  {
57  public: enum NoiseType
58  {
61  GAUSSIAN
62  };
63 
69  public: explicit Noise(NoiseType _type);
70 
72  public: virtual ~Noise();
73 
77  public: virtual void Load(sdf::ElementPtr _sdf);
78 
82  public: double Apply(double _in);
83 
88  public: virtual double ApplyImpl(double _in);
89 
91  public: virtual void Fini();
92 
95  public: NoiseType GetNoiseType() const;
96 
101  public: virtual void SetCustomNoiseCallback(
102  boost::function<double (double)> _cb);
103 
108  public: virtual void SetCamera(rendering::CameraPtr _camera);
109 
111  private: NoiseType type;
112 
114  private: sdf::ElementPtr sdf;
115 
117  private: boost::function<double (double)> customNoiseCallback;
118  };
120  }
121 }
122 #endif
boost::shared_ptr< Noise > NoisePtr
Definition: SensorTypes.hh:107
Use this noise manager for creating and loading noise models.
Definition: Noise.hh:39
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:80
NoiseType
Which noise types we support.
Definition: Noise.hh:57
Definition: Noise.hh:59
Definition: Noise.hh:60
Forward declarations and typedefs for sensors.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48
Noise models for sensor output signals.
Definition: Noise.hh:54