24 #ifndef SOUNDSENSOR_H_
25 # define SOUNDSENSOR_H_
51 int segments=1,
int levels=1,
double maxDistance=50,
double noisestrength=0.1);
63 virtual std::list<sensor>
getList()
const override;
65 virtual int get(
sensor* sensors,
int length)
const override;
virtual std::list< sensor > getList() const override
returns a list of sensor values (usually in the range [-1,1] ) This function should be overloaded...
Definition: soundsensor.cpp:136
double sensor
Definition: types.h:29
Sound sensor with possible direction and frequency detection and also distance dependence (Not implem...
Definition: soundsensor.h:38
Abstract class for sensors that can be plugged into a robot.
Definition: sensor.h:43
virtual int getSensorNumber() const override
returns the number of sensors values produced by this sensor
Definition: soundsensor.cpp:124
Definition: soundsensor.h:45
Interface class for primitives represented in the physical and graphical world.
Definition: primitive.h:80
Data structure holding all essential global information.
Definition: globaldata.h:57
Dimensions
defines which dimensions should be count.
Definition: trackablemeasure.h:42
Measure
Segments: for each segement and level we get the Angle: for each level we get a triple (intensity...
Definition: soundsensor.h:45
Object that represents a sound signal in the simulator.
Definition: sound.h:35
virtual bool sense(const GlobalData &globaldata) override
performs sense action
Definition: soundsensor.cpp:56
virtual ~SoundSensor()
Definition: soundsensor.cpp:47
virtual void init(Primitive *own, Joint *joint=0) override
initialises sensor with a body of robot and optionally with a joint.
Definition: soundsensor.h:54
Definition: soundsensor.h:45
SoundSensor(Dimensions dim=Z, Measure measure=Angle, int segments=1, int levels=1, double maxDistance=50, double noisestrength=0.1)
Definition: soundsensor.cpp:33
virtual float distanceDependency(const Sound &s, double distance)
default implementation is a linear decrease in intensity until it is 0 at maxDistance ...
Definition: soundsensor.cpp:52
Definition: soundsensor.h:45