##

GaussianNoiseModel.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _GAZEBO_GAUSSIAN_NOISE_MODEL_HH_
#define _GAZEBO_GAUSSIAN_NOISE_MODEL_HH_
#include <vector>
#include <string>
#include <sdf/sdf.hh>
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/sensors/Noise.hh"
#include "gazebo/util/system.hh"
namespace Ogre
{
class CompositorInstance;
}
namespace gazebo
{
class GaussianNoiseCompositorListener;
namespace sensors
{
class GZ_SENSORS_VISIBLE GaussianNoiseModel : public Noise
{
public: GaussianNoiseModel();
public: virtual ~GaussianNoiseModel();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
// Documentation inherited.
public: virtual void Fini();
// Documentation inherited.
public: double ApplyImpl(double _in);
public: double GetMean() const;
public: double GetStdDev() const;
public: double GetBias() const;
public: virtual void Print(std::ostream &_out) const;
protected: double mean;
protected: double stdDev;
protected: double bias;
protected: double precision;
protected: bool quantized;
};
class GZ_SENSORS_VISIBLE ImageGaussianNoiseModel : public GaussianNoiseModel
{
public: ImageGaussianNoiseModel();
public: virtual ~ImageGaussianNoiseModel();
// Documentation inherited.
public: virtual void Load(sdf::ElementPtr _sdf);
// Documentation inherited.
public: virtual void Fini();
// Documentation inherited.
public: virtual void SetCamera(rendering::CameraPtr _camera);
public: virtual void Print(std::ostream &_out) const;
public: Ogre::CompositorInstance *gaussianNoiseInstance;
public: boost::shared_ptr<GaussianNoiseCompositorListener>
gaussianNoiseCompositorListener;
};
}
}
#endif
gazebo::sensors::ImageGaussianNoiseModel
Definition: GaussianNoiseModel.hh:96
gazebo::sensors::GaussianNoiseModel
Gaussian noise class.
Definition: GaussianNoiseModel.hh:43
Ogre
Definition: JointMaker.hh:39
gazebo::sensors::GaussianNoiseModel::precision
double precision
If type==GAUSSIAN_QUANTIZED, the precision to which the output signal is rounded.
Definition: GaussianNoiseModel.hh:88
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::sensors::ImageGaussianNoiseModel::Fini
virtual void Fini()
Finalize the noise model.
gazebo::sensors::GaussianNoiseModel::Print
virtual void Print(std::ostream &_out) const
Documentation inherited.
gazebo::sensors::GaussianNoiseModel::mean
double mean
If type starts with GAUSSIAN, the mean of the distribution from which we sample when adding noise.
Definition: GaussianNoiseModel.hh:77
gazebo::sensors::GaussianNoiseModel::stdDev
double stdDev
If type starts with GAUSSIAN, the standard deviation of the distribution from which we sample when ad...
Definition: GaussianNoiseModel.hh:81
gazebo::sensors::ImageGaussianNoiseModel::SetCamera
virtual void SetCamera(rendering::CameraPtr _camera)
Set camera needed to create image noise.
Noise.hh
sensors
sensors
Definition: SensorManager.hh:35
gazebo::sensors::GaussianNoiseModel::quantized
bool quantized
True if the type is GAUSSIAN_QUANTIZED.
Definition: GaussianNoiseModel.hh:91
gazebo::sensors::Noise
Noise models for sensor output signals.
Definition: Noise.hh:55
gazebo::sensors::ImageGaussianNoiseModel::ImageGaussianNoiseModel
ImageGaussianNoiseModel()
Constructor.
system.hh
gazebo::sensors::GaussianNoiseModel::ApplyImpl
double ApplyImpl(double _in)
Apply noise to input data value.
gazebo::sensors::ImageGaussianNoiseModel::gaussianNoiseCompositorListener
boost::shared_ptr< GaussianNoiseCompositorListener > gaussianNoiseCompositorListener
Gaussian noise compositor listener.
Definition: GaussianNoiseModel.hh:121
gazebo::sensors::GaussianNoiseModel::Fini
virtual void Fini()
Finalize the noise model.
gazebo::sensors::ImageGaussianNoiseModel::gaussianNoiseInstance
Ogre::CompositorInstance * gaussianNoiseInstance
Gaussian noise compositor.
Definition: GaussianNoiseModel.hh:117
gazebo::sensors::GaussianNoiseModel::bias
double bias
If type starts with GAUSSIAN, the bias we'll add.
Definition: GaussianNoiseModel.hh:84
RenderTypes.hh
gazebo::sensors::ImageGaussianNoiseModel::Load
virtual void Load(sdf::ElementPtr _sdf)
Load noise parameters from sdf.
gazebo::sensors::ImageGaussianNoiseModel::Print
virtual void Print(std::ostream &_out) const
Documentation inherited.
gazebo::sensors::GaussianNoiseModel::GetMean
double GetMean() const
Accessor for mean.
gazebo::sensors::GaussianNoiseModel::GetBias
double GetBias() const
Accessor for bias.
gazebo::sensors::GaussianNoiseModel::Load
virtual void Load(sdf::ElementPtr _sdf)
Load noise parameters from sdf.
gazebo::sensors::ImageGaussianNoiseModel::~ImageGaussianNoiseModel
virtual ~ImageGaussianNoiseModel()
Destructor.
gazebo::rendering::CameraPtr
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90
gazebo::sensors::GaussianNoiseModel::~GaussianNoiseModel
virtual ~GaussianNoiseModel()
Destructor.
gazebo::sensors::GaussianNoiseModel::GaussianNoiseModel
GaussianNoiseModel()
Constructor.
gazebo::sensors::GaussianNoiseModel::GetStdDev
double GetStdDev() const
Accessor for stddev.