Page 1 of 1

Understanding the way noise is applied to sensors

Posted: Wed Jul 11, 2018 11:46 am
by Elendurwen
Hi,

I am using the blob omnidirectional camera of footbot. I want to add noise to the simulation using the noise_std_dev XML attribute. I am struggling to understand the way in which noise is added.

I found this code in colored_blob_omnidirectional_camera_rotzonly_sensor.cpp:

Code: Select all

/* If noise was setup, add it */ if(m_fDistanceNoiseStdDev > 0.0f) { m_cLEDRelativePosXY += CVector2( m_cLEDRelativePosXY.Length() * m_pcRNG->Gaussian(m_fDistanceNoiseStdDev), m_pcRNG->Uniform(CRadians::UNSIGNED_RANGE)); }
From the way I understand the code, the perceived distance changes proportionally to the actual distance, using the noise_std_dev as parameter. However, why doesn't the random generator function for angle also include the parameter? Is the angle generated completely randomly between 0 +/- 360?

Re: Understanding the way noise is applied to sensors

Posted: Thu Jul 12, 2018 5:33 pm
by pincy
The way noise is calculated is by adding a vector whose angle is uniformly chosen between 0 and 360 degrees, and whose length is scaled by a zero-mean Gaussian.

The reason why we didn't add a parameter for the angle is that we never found data that biased the angle in a specific range. We can always improve the model if you think you need something different! Do you have a proposal?

Re: Understanding the way noise is applied to sensors

Posted: Wed Aug 22, 2018 1:45 pm
by Elendurwen
Thanks for your answer.

So are you basically saying, that with a real robot, you are:

a) more likely to have a small error on distance measurement, rather than a big error (thus Gaussian error)
b) as likely to have a small error on angle as a large error? (thus uniform distribution)

It seems odd to me that the robot would be equally likely to make a mistake of 5 degrees as it would be of making mistake of say 90 degrees. But if that's what you have measured, then I believe your implementation is correct.

Best,
Lenka