Enki  1.9
Public Member Functions | List of all members
Enki::SbotMicrophone Class Reference

Specific microphone for S-bots. More...

#include <Sbot.h>

Inheritance diagram for Enki::SbotMicrophone:
Enki::FourWayMic Enki::LocalInteraction

Public Member Functions

 SbotMicrophone (Robot *owner, double micDist, double range, MicrophoneResponseModel micModel, unsigned channels)
 Constructor e.g. More...
 
void objectStep (double dt, PhysicalObject *po, World *w)
 Check for local interactions with other physical objects.
 
- Public Member Functions inherited from Enki::FourWayMic
 FourWayMic (Robot *owner, double micDist, double range, MicrophoneResponseModel micModel, unsigned channels)
 Constructor e.g. More...
 
 ~FourWayMic (void)
 Destructor.
 
void init ()
 Reset distance values, called every w->step()
 
void resetSound (void)
 Reset sound buffer to 0 after one time-step in experiment.
 
double * getAcquiredSound (unsigned micNo)
 Return frequencies of input sound.
 
void getMaxChannel (unsigned micNo, double *intensity, int *channel)
 Find frequency with maximum intensity.
 
Vector getMicAbsPos (unsigned micNo)
 Get absolute position of microphone.
 
- Public Member Functions inherited from Enki::LocalInteraction
 LocalInteraction ()
 Constructor.
 
 LocalInteraction (double range, Robot *owner)
 Constructor.
 
virtual ~LocalInteraction ()
 Destructor.
 
virtual void init (double dt, World *w)
 Init at each step.
 
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.
 

Additional Inherited Members

- Protected Attributes inherited from Enki::FourWayMic
PhysicalObjectowner
 Robot/object with the microphone.
 
Vector allMicAbsPos [4]
 Absolute position in the world, updated on init()
 
double micDist
 Distance of the mics from centre of object.
 
MicrophoneResponseModel micModel
 Microphone frequency response model.
 
double range
 Actual detection range.
 
unsigned noOfChannels
 No of frequency channels distinguished in input.
 
double * acquiredSound [4]
 Microphone input signal (array of size noOfChannels for 4 mics)
 
- Protected Attributes inherited from Enki::LocalInteraction
double r
 Radius of the local interaction.
 
Robotowner
 The physical object that owns the interaction.
 

Detailed Description

Specific microphone for S-bots.

This microphone checks whether there are sounds coming from sound-emitting objects, and also other s-bots

Constructor & Destructor Documentation

Enki::SbotMicrophone::SbotMicrophone ( Robot owner,
double  micDist,
double  range,
MicrophoneResponseModel  micModel,
unsigned  channels 
)
inline

Constructor e.g.

: FourWayMic(this, 0.5, 5, micStepModel, 20); meaning: the 4 mics are 0.5 away from robot center, can hear sounds up to ! 5 units away, uses a step model to detect sounds and can distinguish 20 frequencies


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