Go to the documentation of this file.
18 #ifndef _GAZEBO_NOISE_HH_
19 #define _GAZEBO_NOISE_HH_
24 #include <boost/function.hpp>
49 public:
static NoisePtr NewNoiseModel(sdf::ElementPtr _sdf,
50 const std::string &_sensorType =
"");
70 public:
explicit Noise(NoiseType _type);
73 public:
virtual ~
Noise();
78 public:
virtual void Load(sdf::ElementPtr _sdf);
83 public:
double Apply(
double _in,
double _dt = 0.0);
89 public:
virtual double ApplyImpl(
double _in,
double _dt = 0.0);
92 public:
virtual void Fini();
96 public: NoiseType GetNoiseType()
const;
104 public:
virtual void SetCustomNoiseCallback(
105 boost::function<
double (
double)> _cb);
113 public:
virtual void SetCustomNoiseCallbackTime(
114 boost::function<
double (
double,
double)> _cb);
124 public:
virtual void Print(std::ostream &_out)
const;
127 private: NoiseType type;
130 private: sdf::ElementPtr sdf;
133 private: std::function<double (
double)> customNoiseCallback;
136 private: std::function<double (
double,
double)> customNoiseCallbackTime;
virtual double ApplyImpl(double _in, double _dt=0.0)
Apply noise to input data value.
NoiseType
Which noise types we support.
Definition: Noise.hh:58
Forward declarations for the common classes.
Definition: Animation.hh:26
NoiseType GetNoiseType() const
Accessor for NoiseType.
virtual void Print(std::ostream &_out) const
Output information about the noise model.
virtual void Load(sdf::ElementPtr _sdf)
Load noise parameters from sdf.
virtual void SetCustomNoiseCallbackTime(boost::function< double(double, double)> _cb)
Register a custom noise callback, with time.
double Apply(double _in, double _dt=0.0)
Apply noise to input data value.
sensors
Definition: SensorManager.hh:36
Forward declarations and typedefs for sensors.
Noise models for sensor output signals.
Definition: Noise.hh:55
virtual void SetCamera(rendering::CameraPtr _camera)
Set camera needed to create image noise.
Use this noise manager for creating and loading noise models.
Definition: Noise.hh:40
virtual ~Noise()
Destructor.
virtual void SetCustomNoiseCallback(boost::function< double(double)> _cb)
Register a custom noise callback.
virtual void Fini()
Finalize the noise model.
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90
std::shared_ptr< Noise > NoisePtr
Definition: SensorTypes.hh:124
static NoisePtr NewNoiseModel(sdf::ElementPtr _sdf, const std::string &_sensorType="")
Load a noise model based on the input sdf parameters and sensor type.
Noise(NoiseType _type)
Constructor.