|
Enki
1.9
|
A ground infrared sensor. More...
#include <GroundSensor.h>
Public Member Functions | |
| GroundSensor (Robot *owner, Vector pos, double mFactor, double aFactor, double spatialSd=0.4, double noiseSd=0.) | |
| Constructor. More... | |
| void | init (double dt, World *w) |
| Compute absolute position. | |
| double | getValue (void) const |
| Reset intensity value Return the final sensor value. | |
| Point | getAbsolutePosition (void) const |
| Return the absolute position of the ground sensor, updated at each time step on init() | |
Public Member Functions inherited from Enki::LocalInteraction | |
| LocalInteraction () | |
| Constructor. | |
| LocalInteraction (double range, Robot *owner) | |
| Constructor. | |
| virtual | ~LocalInteraction () |
| Destructor. | |
| virtual void | objectStep (double dt, World *w, PhysicalObject *po) |
| Interact with object. More... | |
| virtual void | wallsStep (double dt, World *w) |
| Interact with walls. More... | |
| virtual void | finalize (double dt, World *w) |
| Finalize at each step. | |
| double | getRange () const |
| Return the range of the interaction. | |
Protected Attributes | |
| Vector | absPos |
| Absolute position in the world, updated on init() | |
| const Vector | pos |
| Relative position on the robot. | |
| const double | mFactor |
| Multiplicative factor to compute finalValue. | |
| const double | aFactor |
| Additive factor to compute finalValue. | |
| const double | noiseSd |
| Standard deviation of Gaussian noise in the response space. | |
| double | filter [9][9] |
| Pre-computed coefficient to filter ground image on a 2x2 cm square, with a 0.25 cm resolution. | |
| double | finalValue |
| Final sensor value. | |
Protected Attributes inherited from Enki::LocalInteraction | |
| double | r |
| Radius of the local interaction. | |
| Robot * | owner |
| The physical object that owns the interaction. | |
A ground infrared sensor.
This sensor scans the intensity of a 2x2 cm square on the ground. It does 9x9 measurements, using a Gaussian model with a given spatialSd standard deviation, and a noiseSd Gaussian measurement error.
The final value is multiplied by mFactor, summed to aFactor, and then noiseSd is applied.
| Enki::GroundSensor::GroundSensor | ( | Robot * | owner, |
| Vector | pos, | ||
| double | mFactor, | ||
| double | aFactor, | ||
| double | spatialSd = 0.4, |
||
| double | noiseSd = 0. |
||
| ) |
Constructor.
| owner | robot which embeds this sensor |
| pos | relative position (x,y) on the robot |
| mFactor | multiplicative factor to compute finalValue |
| aFactor | additive factor to compute finalValue |
| spatialSd | standard deviation of the reading beam on the sensor on the ground |
| noiseSd | standard deviation of Gaussian noise in the response space |
References filter, and Enki::LocalInteraction::owner.
1.8.11