src/systems/logical_audio_sensor_plugin/LogicalAudio.hh
This library is part of the Ignition Robotics project.
STL class.
void setAttenuationFunction(AttenuationFunction &_attenuationFunc, std::string _str)
Set the attenuation function that matches the defined string. The string is not case sensitive,...
void setAttenuationShape(AttenuationShape &_attenuationShape, std::string _str)
Set the attenuation shape that matches the defined string. The string is not case sensitive,...
AttenuationShape
Audio source attenuation shapes. AttenuationShape::Undefined is used to indicate that an attenuation ...
Definition: include/gz/sim/components/LogicalAudio.hh:46
AttenuationFunction
Audio source attenuation functions. AttenuationFunction::Undefined is used to indicate that an attenu...
Definition: include/gz/sim/components/LogicalAudio.hh:41
bool detect(double _volumeLevel, double _volumeDetectionThreshold)
Determines if an audio device can detect volume at a certain level.
void validateVolumeLevel(double &_volumeLevel)
Validate a source's emission volume level.
void validateInnerRadiusAndFalloffDistance(double &_innerRadius, double &_falloffDistance)
Validate the inner radius and falloff distance for an audio source.
double computeVolume(bool _playing, AttenuationFunction _attenuationFunc, AttenuationShape _attenuationShape, double _sourceEmissionVolume, double _innerRadius, double _falloffDistance, const gz::math::Pose3d &_sourcePose, const gz::math::Pose3d &_targetPose)
Computes the volume level of an audio source at a certain location.