Blob Blame History Raw
diff -up ./gazebo/sensors/GaussianNoiseModel.cc.gaussianstddev ./gazebo/sensors/GaussianNoiseModel.cc
--- ./gazebo/sensors/GaussianNoiseModel.cc.gaussianstddev	2020-01-18 13:54:05.637290373 -0500
+++ ./gazebo/sensors/GaussianNoiseModel.cc	2020-01-18 13:55:36.961532289 -0500
@@ -193,8 +193,12 @@ double GaussianNoiseModel::GetBias() con
 //////////////////////////////////////////////////
 void GaussianNoiseModel::SampleBias()
 {
-  this->bias =
+  if (this->biasStdDev > 0) {
+    this->bias =
       ignition::math::Rand::DblNormal(this->biasMean, this->biasStdDev);
+  } else {
+    this->bias = this->biasMean;
+  }
   // With equal probability, we pick a negative bias (by convention,
   // rateBiasMean should be positive, though it would work fine if
   // negative).