Enki  1.9
Public Member Functions | Protected Attributes | List of all members
Enki::GroundSensor Class Reference

A ground infrared sensor. More...

#include <GroundSensor.h>

Inheritance diagram for Enki::GroundSensor:
Enki::LocalInteraction

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.
 
Robotowner
 The physical object that owns the interaction.
 

Detailed Description

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.

Constructor & Destructor Documentation

Enki::GroundSensor::GroundSensor ( Robot owner,
Vector  pos,
double  mFactor,
double  aFactor,
double  spatialSd = 0.4,
double  noiseSd = 0. 
)

Constructor.

Parameters
ownerrobot which embeds this sensor
posrelative position (x,y) on the robot
mFactormultiplicative factor to compute finalValue
aFactoradditive factor to compute finalValue
spatialSdstandard deviation of the reading beam on the sensor on the ground
noiseSdstandard deviation of Gaussian noise in the response space

References filter, and Enki::LocalInteraction::owner.


The documentation for this class was generated from the following files: