Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
This "motor" emulates a speaker or piezo element to produce sound. More...
#include <speaker.h>
Public Member Functions | |
Speaker (float frequency, double visualSize=0.5, Pos visualOffset=Pos(0, 0, 1)) | |
virtual | ~Speaker () |
virtual void | init (Primitive *own, Joint *joint=0) |
initialises motor with body of robot More... | |
virtual int | getMotorNumber () const |
return the dimensionality of this motor More... | |
virtual bool | act (GlobalData &globaldata) |
performs the actions, This is usually called in doInternalStuff() from the robot More... | |
virtual int | set (const motor *values, int length) |
sends the action commands to the motor. More... | |
![]() | |
Motor () | |
virtual | ~Motor () |
virtual std::list < SensorMotorInfo > | getMotorInfos () const |
returns a list of motor names ( More... | |
![]() | |
SensorMotorInfoAble () | |
void | setBaseName (const std::string &basename) |
void | setBaseInfo (const SensorMotorInfo &baseinfo) |
SensorMotorInfo | getBaseInfo () |
void | setNamingFunc (const NamingFunction &func) |
NamingFunction | getNamingFunc () const |
void | setNames (const std::vector< std::string > &names) |
set names explicitly (basename is anyway suffixed) More... | |
std::string | getName (int index) const |
returns the name of a single item. Typically called from within Sensor and Motor class. More... | |
std::list< SensorMotorInfo > | getInfos (int number) const |
get all infos. More... | |
Additional Inherited Members | |
![]() | |
typedef std::function < std::string(int)> | NamingFunction |
function that returns the name given the index More... | |
![]() | |
static std::string | defaultNameing (int index) |
the default implementation is for index==0: basename, otherwise basename + (index+1) More... | |
![]() | |
NamingFunction | func |
SensorMotorInfo | baseinfo |
This "motor" emulates a speaker or piezo element to produce sound.
The sound can be detected by sound sensors (
|
inlinevirtual |
|
inlinevirtual |
performs the actions, This is usually called in doInternalStuff() from the robot
Implements Motor.
|
inlinevirtual |
return the dimensionality of this motor
Implements Motor.
initialises motor with body of robot
Implements Motor.
|
inlinevirtual |
sends the action commands to the motor.
It returns the number of used values. (should be equal to getMotorNumber)
Implements Motor.