icub-client
Classes

Abstract class to handle sub-systems of the icub-client (speech, action, etc...) and the relevant subclasses. More...

+ Collaboration diagram for Subsystems:

Classes

class  icubclient::SubSystem
 Abstract class to handle sub-systems of the icub-client. More...
 
class  icubclient::SubSystem_agentDetector
 SubSystem for agentDetector. More...
 
class  icubclient::SubSystem_ARE
 SubSystem to deal with the actionsRenderingEngine module (a.k.a. More...
 
class  icubclient::SubSystem_babbling
 SubSystem for babbling. More...
 
class  icubclient::SubSystem_emotion
 SubSystem for emotion. More...
 
class  icubclient::SubSystem_IOL2OPC
 SubSystem for iol2opc. More...
 
class  icubclient::SubSystem_KARMA
 SubSystem to deal with the experimental affordance learning module (a.k.a. More...
 
class  icubclient::SubSystem_Recog
 Abstract subSystem for speech recognizer. More...
 
class  icubclient::SubSystem_SAM
 SubSystem for SAM. More...
 
class  icubclient::SubSystem_Speech
 Abstract subSystem for speech management (Text to Speech) More...
 
class  icubclient::SubSystem_Speech_eSpeak
 SubSystem for speech synthesis with emotional tuning of speed and pitch using eSpeak. More...
 

Detailed Description

Abstract class to handle sub-systems of the icub-client (speech, action, etc...) and the relevant subclasses.


Class Documentation

◆ icubclient::SubSystem

class icubclient::SubSystem

Abstract class to handle sub-systems of the icub-client.

Definition at line 43 of file subSystem.h.

+ Inheritance diagram for icubclient::SubSystem:

Public Member Functions

 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
virtual void Close ()=0
 Clean up resources. More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

virtual bool connect ()=0
 

Protected Attributes

std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem()

icubclient::SubSystem::SubSystem ( const std::string &  masterName)
inline

Definition at line 53 of file subSystem.h.

◆ ~SubSystem()

virtual icubclient::SubSystem::~SubSystem ( )
inlinevirtual

Definition at line 54 of file subSystem.h.

Member Function Documentation

◆ Close()

◆ connect()

◆ Connect()

bool icubclient::SubSystem::Connect ( )
inline

Connects the subsystem to its "host".

Returns
True if successful, false otherwise

Definition at line 59 of file subSystem.h.

◆ getType()

std::string icubclient::SubSystem::getType ( ) const
inline

Return the type of the subsystem as string.

Definition at line 71 of file subSystem.h.

Member Data Documentation

◆ m_masterName

std::string icubclient::SubSystem::m_masterName
protected

Definition at line 46 of file subSystem.h.

◆ m_type

std::string icubclient::SubSystem::m_type
protected

Definition at line 47 of file subSystem.h.

◆ portRPC

yarp::os::RpcClient icubclient::SubSystem::portRPC
protected

Definition at line 48 of file subSystem.h.

◆ icubclient::SubSystem_agentDetector

class icubclient::SubSystem_agentDetector

SubSystem for agentDetector.

Definition at line 33 of file subSystem_agentDetector.h.

+ Inheritance diagram for icubclient::SubSystem_agentDetector:

Public Member Functions

 SubSystem_agentDetector (const std::string &masterName)
 Default constructor. More...
 
virtual void Close ()
 Clean up resources. More...
 
void pause ()
 Pause the agentDetector. More...
 
void resume ()
 The skeleton detection of agentDetector will be resumed. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

virtual bool connect ()
 
bool changeDefaultName (const std::string &new_name)
 Changes the name of the partner within agentDetector Internally used by ICubClient::changeName. More...
 

Friends

class ICubClient
 

Additional Inherited Members

- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_agentDetector()

icubclient::SubSystem_agentDetector::SubSystem_agentDetector ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 12 of file subSystem_agentDetector.cpp.

Member Function Documentation

◆ changeDefaultName()

bool icubclient::SubSystem_agentDetector::changeDefaultName ( const std::string &  new_name)
protected

Changes the name of the partner within agentDetector Internally used by ICubClient::changeName.

Parameters
new_name
Returns
true if successful, false otherwise

Definition at line 22 of file subSystem_agentDetector.cpp.

◆ Close()

void icubclient::SubSystem_agentDetector::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 17 of file subSystem_agentDetector.cpp.

◆ connect()

bool icubclient::SubSystem_agentDetector::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 4 of file subSystem_agentDetector.cpp.

◆ pause()

void icubclient::SubSystem_agentDetector::pause ( )

Pause the agentDetector.

No skeleton information of the human will be updated.

Definition at line 34 of file subSystem_agentDetector.cpp.

◆ resume()

void icubclient::SubSystem_agentDetector::resume ( )

The skeleton detection of agentDetector will be resumed.

Definition at line 40 of file subSystem_agentDetector.cpp.

Friends And Related Function Documentation

◆ ICubClient

friend class ICubClient
friend

Definition at line 35 of file subSystem_agentDetector.h.

◆ icubclient::SubSystem_ARE

class icubclient::SubSystem_ARE

SubSystem to deal with the actionsRenderingEngine module (a.k.a.

ARE) for motor control.

For further details, please refer to the ARE main page: http://wiki.icub.org/iCub_documentation/group__actionsRenderingEngine.html

Definition at line 41 of file subSystem_ARE.h.

+ Inheritance diagram for icubclient::SubSystem_ARE:

Public Member Functions

 SubSystem_ARE (const std::string &masterName)
 Default constructor. More...
 
void Close ()
 Clean up resources. More...
 
bool getTableHeight (double &height)
 Gets the table height from ARE. More...
 
void selectHandCorrectTarget (yarp::os::Bottle &options, yarp::sig::VectorOf< double > &target, const std::string &objName, const std::string handToUse="")
 
yarp::sig::VectorOf< double > applySafetyMargins (const yarp::sig::VectorOf< double > &in)
 Applies safety margins, i.e. More...
 
bool home (const std::string &part="all")
 Put the specified part ih home position. More...
 
bool take (const std::string &sName, const yarp::os::Bottle &options=yarp::os::Bottle())
 Reach the specified [target] and grasp it. More...
 
bool push (const std::string &sName, const yarp::os::Bottle &options=yarp::os::Bottle())
 Reach the specified [target] from one side and then push it laterally. More...
 
bool point (const yarp::sig::VectorOf< double > &targetUnsafe, const yarp::os::Bottle &options=yarp::os::Bottle())
 Point at the specified [target] with the index finger. More...
 
bool drop (const yarp::os::Bottle &options=yarp::os::Bottle())
 If an object is held, bring it over the table and drop it on a random position. More...
 
bool dropOn (const yarp::sig::VectorOf< double > &targetUnsafe, const yarp::os::Bottle &options=yarp::os::Bottle())
 Drop the object on a given target. More...
 
bool observe (const yarp::os::Bottle &options=yarp::os::Bottle())
 Bring the hand in the visual field and move it with the purpose of visual exploration. More...
 
bool expect (const yarp::os::Bottle &options=yarp::os::Bottle())
 Put one hand forward with the palm facing up and wait for an object. More...
 
bool give (const yarp::os::Bottle &options=yarp::os::Bottle())
 Put one hand forward with the palm facing up and open the fingers so that the object held in the hand is free to be taken. More...
 
bool waving (const bool sw)
 Enable/disable arms waving. More...
 
bool look (const yarp::sig::VectorOf< double > &target, const yarp::os::Bottle &options=yarp::os::Bottle())
 Look at the specified [target]. More...
 
bool track (const yarp::sig::VectorOf< double > &target, const yarp::os::Bottle &options=yarp::os::Bottle())
 Track the specified [target]. More...
 
bool impedance (const bool sw)
 Enable/disable impedance control. More...
 
bool setExecTime (const double execTime)
 Change default arm movement execution time. More...
 
 ~SubSystem_ARE ()
 Destructor. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

void appendCartesianTarget (yarp::os::Bottle &b, const yarp::sig::VectorOf< double > &t)
 Appends a target vector t to the Bottle b More...
 
bool sendCmd (const yarp::os::Bottle &cmd)
 Sends a command to ARE's cmdPort. More...
 
bool connect ()
 

Protected Attributes

OPCClientopc
 
yarp::os::RpcClient portCmd
 Port to /ARE/cmd:io. More...
 
yarp::os::RpcClient portRPC
 Port to /ARE/rpc. More...
 
yarp::os::RpcClient portGet
 Port to /ARE/get:io. More...
 
yarp::os::RpcClient portCalib
 Port to iolReachingCalibration. More...
 
std::string lastlyUsedHand
 The hand which was used for the last action. More...
 
- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_ARE()

icubclient::SubSystem_ARE::SubSystem_ARE ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 102 of file subSystem_ARE.cpp.

◆ ~SubSystem_ARE()

icubclient::SubSystem_ARE::~SubSystem_ARE ( )

Destructor.

Definition at line 420 of file subSystem_ARE.cpp.

Member Function Documentation

◆ appendCartesianTarget()

void icubclient::SubSystem_ARE::appendCartesianTarget ( yarp::os::Bottle &  b,
const yarp::sig::VectorOf< double > &  t 
)
protected

Appends a target vector t to the Bottle b

Parameters
bBottle to append vector to
tVector to be appended

Definition at line 4 of file subSystem_ARE.cpp.

◆ applySafetyMargins()

yarp::sig::VectorOf< double > icubclient::SubSystem_ARE::applySafetyMargins ( const yarp::sig::VectorOf< double > &  in)

Applies safety margins, i.e.

the in vector should be at least table height and at least 0.1m in front of the iCub

Parameters
in"Unsafe" vector
Returns
"safe" vector

Definition at line 148 of file subSystem_ARE.cpp.

◆ Close()

void icubclient::SubSystem_ARE::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 114 of file subSystem_ARE.cpp.

◆ connect()

bool icubclient::SubSystem_ARE::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 76 of file subSystem_ARE.cpp.

◆ drop()

bool icubclient::SubSystem_ARE::drop ( const yarp::os::Bottle &  options = yarp::os::Bottle())

If an object is held, bring it over the table and drop it on a random position.

Parameters
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 273 of file subSystem_ARE.cpp.

◆ dropOn()

bool icubclient::SubSystem_ARE::dropOn ( const yarp::sig::VectorOf< double > &  targetUnsafe,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

Drop the object on a given target.

Parameters
targetUnsafeTarget where to drop in cartesian coordinates
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 291 of file subSystem_ARE.cpp.

◆ expect()

bool icubclient::SubSystem_ARE::expect ( const yarp::os::Bottle &  options = yarp::os::Bottle())

Put one hand forward with the palm facing up and wait for an object.

Parameters
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 330 of file subSystem_ARE.cpp.

◆ getTableHeight()

bool icubclient::SubSystem_ARE::getTableHeight ( double &  height)

Gets the table height from ARE.

Parameters
height- reference to the output double
Returns
true on successful communication with ARE, false otherwise

Definition at line 130 of file subSystem_ARE.cpp.

◆ give()

bool icubclient::SubSystem_ARE::give ( const yarp::os::Bottle &  options = yarp::os::Bottle())

Put one hand forward with the palm facing up and open the fingers so that the object held in the hand is free to be taken.

Parameters
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 346 of file subSystem_ARE.cpp.

◆ home()

bool icubclient::SubSystem_ARE::home ( const std::string &  part = "all")

Put the specified part ih home position.

Parameters
partthe part to be homed ("gaze", "head", "arms", "fingers", "all"; "all" by default).
Returns
true in case of successful motor command, false otherwise.

Definition at line 160 of file subSystem_ARE.cpp.

◆ impedance()

bool icubclient::SubSystem_ARE::impedance ( const bool  sw)

Enable/disable impedance control.

Parameters
swenable/disable if true/false.
Returns
true in case of successful request, false otherwise.

Definition at line 404 of file subSystem_ARE.cpp.

◆ look()

bool icubclient::SubSystem_ARE::look ( const yarp::sig::VectorOf< double > &  target,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

Look at the specified [target].

Parameters
targetTarget to look at in cartesian coordinates
optionsOptions of ARE commands ("fixate", "wait", (block_eyes ver)).
Returns
true in case of successful motor command, false otherwise.

Definition at line 376 of file subSystem_ARE.cpp.

◆ observe()

bool icubclient::SubSystem_ARE::observe ( const yarp::os::Bottle &  options = yarp::os::Bottle())

Bring the hand in the visual field and move it with the purpose of visual exploration.

Parameters
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 314 of file subSystem_ARE.cpp.

◆ point()

bool icubclient::SubSystem_ARE::point ( const yarp::sig::VectorOf< double > &  targetUnsafe,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

Point at the specified [target] with the index finger.

The target can be far away from the iCub, e.g. a body part of the human. If the target is further away than 31cm, use the "pfar" functionality of ARE. If it is closer than 31cm, use the "point" functionality of ARE.

Parameters
targetUnsafeTarget to point to in cartesian coordinates
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 248 of file subSystem_ARE.cpp.

◆ push()

bool icubclient::SubSystem_ARE::push ( const std::string &  sName,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

Reach the specified [target] from one side and then push it laterally.

Optional parameter "away" can be supplied in order to have the robot push the object away from its root reference frame.

Parameters
sNameName of target to push in cartesian coordinates
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 211 of file subSystem_ARE.cpp.

◆ selectHandCorrectTarget()

void icubclient::SubSystem_ARE::selectHandCorrectTarget ( yarp::os::Bottle &  options,
yarp::sig::VectorOf< double > &  target,
const std::string &  objName,
const std::string  handToUse = "" 
)

Definition at line 12 of file subSystem_ARE.cpp.

◆ sendCmd()

bool icubclient::SubSystem_ARE::sendCmd ( const yarp::os::Bottle &  cmd)
protected

Sends a command to ARE's cmdPort.

Parameters
cmdCommand to be sent
Returns
True if successful

Definition at line 62 of file subSystem_ARE.cpp.

◆ setExecTime()

bool icubclient::SubSystem_ARE::setExecTime ( const double  execTime)

Change default arm movement execution time.

Parameters
execTimethe arm movement execution time given in seconds.
Returns
true in case of successful request, false otherwise.

Definition at line 412 of file subSystem_ARE.cpp.

◆ take()

bool icubclient::SubSystem_ARE::take ( const std::string &  sName,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

Reach the specified [target] and grasp it.

Optional parameter "side" or "above" can be supplied to choose the orientation the robot should keep while performing the action (default: "above").

Parameters
sNameName of target to grasp
optionsOptions of ARE commands ("no_head", "no_gaze", "no_sacc", "still", "left", "right").
Returns
true in case of successful motor command, false otherwise.

Definition at line 175 of file subSystem_ARE.cpp.

◆ track()

bool icubclient::SubSystem_ARE::track ( const yarp::sig::VectorOf< double > &  target,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

Track the specified [target].

Parameters
targetTarget to look at in cartesian coordinates
optionsOptions of ARE commands ("no_sacc").
Returns
true in case of successful motor command, false otherwise.

Definition at line 394 of file subSystem_ARE.cpp.

◆ waving()

bool icubclient::SubSystem_ARE::waving ( const bool  sw)

Enable/disable arms waving.

Parameters
swenable/disable if true/false.
Returns
true in case of successful request, false otherwise.

Definition at line 361 of file subSystem_ARE.cpp.

Member Data Documentation

◆ lastlyUsedHand

std::string icubclient::SubSystem_ARE::lastlyUsedHand
protected

The hand which was used for the last action.

Definition at line 51 of file subSystem_ARE.h.

◆ opc

OPCClient* icubclient::SubSystem_ARE::opc
protected

Definition at line 44 of file subSystem_ARE.h.

◆ portCalib

yarp::os::RpcClient icubclient::SubSystem_ARE::portCalib
protected

Port to iolReachingCalibration.

Definition at line 49 of file subSystem_ARE.h.

◆ portCmd

yarp::os::RpcClient icubclient::SubSystem_ARE::portCmd
protected

Port to /ARE/cmd:io.

Definition at line 46 of file subSystem_ARE.h.

◆ portGet

yarp::os::RpcClient icubclient::SubSystem_ARE::portGet
protected

Port to /ARE/get:io.

Definition at line 48 of file subSystem_ARE.h.

◆ portRPC

yarp::os::RpcClient icubclient::SubSystem_ARE::portRPC
protected

Port to /ARE/rpc.

Definition at line 47 of file subSystem_ARE.h.

◆ icubclient::SubSystem_babbling

class icubclient::SubSystem_babbling

SubSystem for babbling.

Definition at line 33 of file subSystem_babbling.h.

+ Inheritance diagram for icubclient::SubSystem_babbling:

Public Member Functions

 SubSystem_babbling (const std::string &masterName)
 Default constructor. More...
 
virtual void Close ()
 Clean up resources. More...
 
bool babblingArm (const std::string &babblingLimb, double duration=-1.0)
 Whole arm babbling. More...
 
bool babbling (int jointNumber, const std::string &babblingLimb, double duration=-1.0)
 Single joint babbling. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

virtual bool connect ()
 

Additional Inherited Members

- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_babbling()

icubclient::SubSystem_babbling::SubSystem_babbling ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 12 of file subSystem_babbling.cpp.

Member Function Documentation

◆ babbling()

bool icubclient::SubSystem_babbling::babbling ( int  jointNumber,
const std::string &  babblingLimb,
double  duration = -1.0 
)

Single joint babbling.

Parameters
jointNumberWhich joint to babble.
babblingLimbThe limb to babble. Should be "left_arm" or "right_arm"
durationHow long to babble for
Returns
true if successful

Definition at line 36 of file subSystem_babbling.cpp.

◆ babblingArm()

bool icubclient::SubSystem_babbling::babblingArm ( const std::string &  babblingLimb,
double  duration = -1.0 
)

Whole arm babbling.

Parameters
babblingLimbThe limb to babble. Should be "left_arm" or "right_arm"
durationHow long to babble for
Returns
true if successful

Definition at line 22 of file subSystem_babbling.cpp.

◆ Close()

void icubclient::SubSystem_babbling::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 17 of file subSystem_babbling.cpp.

◆ connect()

bool icubclient::SubSystem_babbling::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 4 of file subSystem_babbling.cpp.

◆ icubclient::SubSystem_emotion

class icubclient::SubSystem_emotion

SubSystem for emotion.

Definition at line 33 of file subSystem_emotion.h.

+ Inheritance diagram for icubclient::SubSystem_emotion:

Public Member Functions

 SubSystem_emotion (const std::string &masterName)
 Default constructor. More...
 
virtual void Close ()
 Clean up resources. More...
 
bool setEmotion (std::string emotion, std::string part="all")
 Method to switch iCub emotion for different parts of face. More...
 
std::pair< std::string, std::string > getEmotion ()
 Method to get current iCub emotion. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

virtual bool connect ()
 

Friends

class ICubClient
 

Additional Inherited Members

- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_emotion()

icubclient::SubSystem_emotion::SubSystem_emotion ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 14 of file subSystem_emotion.cpp.

Member Function Documentation

◆ Close()

void icubclient::SubSystem_emotion::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 19 of file subSystem_emotion.cpp.

◆ connect()

bool icubclient::SubSystem_emotion::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 6 of file subSystem_emotion.cpp.

◆ getEmotion()

std::pair< std::string, std::string > icubclient::SubSystem_emotion::getEmotion ( )

Method to get current iCub emotion.

Returns
string with emotion name.

Definition at line 78 of file subSystem_emotion.cpp.

◆ setEmotion()

bool icubclient::SubSystem_emotion::setEmotion ( std::string  emotion,
std::string  part = "all" 
)

Method to switch iCub emotion for different parts of face.

Parameters
emotionString of emotion name
partString of part name - if "all", the whole face is affected
Returns
true if command was sent successful.

Definition at line 24 of file subSystem_emotion.cpp.

Friends And Related Function Documentation

◆ ICubClient

friend class ICubClient
friend

Definition at line 35 of file subSystem_emotion.h.

◆ icubclient::SubSystem_IOL2OPC

class icubclient::SubSystem_IOL2OPC

SubSystem for iol2opc.

Definition at line 33 of file subSystem_iol2opc.h.

+ Inheritance diagram for icubclient::SubSystem_IOL2OPC:

Public Member Functions

 SubSystem_IOL2OPC (const std::string &masterName)
 Default constructor. More...
 
virtual void Close ()
 Clean up resources. More...
 
void pause ()
 Pause the iol2opc object detection. More...
 
void resume ()
 Resume the iol2opc object detection. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

virtual bool connect ()
 
bool changeName (const std::string &old_name, const std::string &new_name)
 Change the name of an object Internally used by ICubClient::changeName. More...
 

Friends

class ICubClient
 

Additional Inherited Members

- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_IOL2OPC()

icubclient::SubSystem_IOL2OPC::SubSystem_IOL2OPC ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 12 of file subSystem_iol2opc.cpp.

Member Function Documentation

◆ changeName()

bool icubclient::SubSystem_IOL2OPC::changeName ( const std::string &  old_name,
const std::string &  new_name 
)
protected

Change the name of an object Internally used by ICubClient::changeName.

Parameters
old_nameName of the object to be changed
new_nameNew name of the object

Definition at line 22 of file subSystem_iol2opc.cpp.

◆ Close()

void icubclient::SubSystem_IOL2OPC::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 17 of file subSystem_iol2opc.cpp.

◆ connect()

bool icubclient::SubSystem_IOL2OPC::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 4 of file subSystem_iol2opc.cpp.

◆ pause()

void icubclient::SubSystem_IOL2OPC::pause ( )

Pause the iol2opc object detection.

Definition at line 32 of file subSystem_iol2opc.cpp.

◆ resume()

void icubclient::SubSystem_IOL2OPC::resume ( )

Resume the iol2opc object detection.

Definition at line 38 of file subSystem_iol2opc.cpp.

Friends And Related Function Documentation

◆ ICubClient

friend class ICubClient
friend

Definition at line 35 of file subSystem_iol2opc.h.

◆ icubclient::SubSystem_KARMA

class icubclient::SubSystem_KARMA

SubSystem to deal with the experimental affordance learning module (a.k.a.

KARMA) for motor control.

For further details, please refer to the KARMA main page: http://robotology.github.io/karma/doxygen/doc/html/group__karmaMotor.html

Definition at line 43 of file subSystem_KARMA.h.

+ Inheritance diagram for icubclient::SubSystem_KARMA:

Public Member Functions

 SubSystem_KARMA (const std::string &masterName, const std::string &robot)
 Default constructor. More...
 
void Close ()
 Clean up resources. More...
 
yarp::sig::VectorOf< double > applySafetyMargins (const yarp::sig::VectorOf< double > &in)
 Applies safety margins, i.e. More...
 
bool chooseArm (const std::string &armType)
 chooseArm (toolAttach in KARMA): wrapper for tool-attach of KARMA, can be used to choose the arm for actions with KARMA More...
 
void chooseArmAuto ()
 chooseArmAuto (toolRemove in KARMA): wrapper for tool-remove of Karma, use to clear the arm choise More...
 
bool pushAside (const std::string &objName, const yarp::sig::VectorOf< double > &objCenter, const double &targetPosY, const double &theta, const std::string &armType="selectable", const yarp::os::Bottle &options=yarp::os::Bottle())
 pushAside (KARMA): push an object to a certain location along y-axis of robot RoF More...
 
bool pushFront (const std::string &objName, const yarp::sig::VectorOf< double > &objCenter, const double &targetPosXFront, const std::string &armType="selectable", const yarp::os::Bottle &options=yarp::os::Bottle())
 pushFront (KARMA): push an object to a certain location along x-axis of robot RoF More...
 
bool push (const yarp::sig::VectorOf< double > &targetCenter, const double theta, const double radius, const yarp::os::Bottle &options=yarp::os::Bottle())
 push (KARMA): push to certain position, along a defined direction More...
 
bool pullBack (const std::string &objName, const yarp::sig::VectorOf< double > &objCenter, const double &targetPosXBack, const std::string &armType="selectable", const yarp::os::Bottle &options=yarp::os::Bottle())
 pullBack (KARMA): pull an object to a certain location along x-axis of robot RoF More...
 
bool draw (const yarp::sig::VectorOf< double > &targetCenter, const double theta, const double radius, const double dist, const yarp::os::Bottle &options=yarp::os::Bottle())
 draw (KARMA): draw action, along the positive direction of the x-axis (in robot FoR) More...
 
bool vdraw (const std::string &objName, const yarp::sig::VectorOf< double > &targetCenter, const double theta, const double radius, const double dist, const yarp::os::Bottle &options=yarp::os::Bottle())
 vdraw (KARMA): virtual draw action, along the positive direction of the x-axis (in robot FoR) More...
 
bool openCartesianClient ()
 
 ~SubSystem_KARMA ()
 Destructor. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

void appendTarget (yarp::os::Bottle &b, const yarp::sig::VectorOf< double > &tCenter)
 Appends a target vector t to the Bottle More...
 
void appendDouble (yarp::os::Bottle &b, const double &v)
 Appends a double value v to the Bottle More...
 
bool returnArmSafely (std::string armType)
 
void selectHandCorrectTarget (yarp::os::Bottle &options, const std::string &targetName, yarp::sig::VectorOf< double > &target, const std::string handToUse="")
 
bool sendCmd (yarp::os::Bottle &cmd)
 Sends a command to KARMA's RPC port. More...
 
bool connect ()
 

Protected Attributes

SubSystem_ARESubARE
 
bool AREconnected
 
std::string robot
 
double tableHeight
 
bool hasTable
 
yarp::os::RpcClient portStop
 
yarp::os::RpcClient portVision
 
yarp::os::RpcClient portFinder
 
yarp::os::RpcClient portCalib
 
yarp::dev::PolyDriver driverL
 
yarp::dev::PolyDriver driverR
 
yarp::dev::PolyDriver driverHL
 
yarp::dev::PolyDriver driverHR
 
yarp::dev::ICartesianControl * iCartCtrlL
 
yarp::dev::ICartesianControl * iCartCtrlR
 
- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_KARMA()

icubclient::SubSystem_KARMA::SubSystem_KARMA ( const std::string &  masterName,
const std::string &  robot 
)

Default constructor.

Parameters
masterNamestem-name used to open up ports.
robotname of the robot (icub or icubSim)

Definition at line 132 of file subSystem_KARMA.cpp.

◆ ~SubSystem_KARMA()

icubclient::SubSystem_KARMA::~SubSystem_KARMA ( )

Destructor.

Definition at line 502 of file subSystem_KARMA.cpp.

Member Function Documentation

◆ appendDouble()

void icubclient::SubSystem_KARMA::appendDouble ( yarp::os::Bottle &  b,
const double &  v 
)
protected

Appends a double value v to the Bottle

Definition at line 15 of file subSystem_KARMA.cpp.

◆ appendTarget()

void icubclient::SubSystem_KARMA::appendTarget ( yarp::os::Bottle &  b,
const yarp::sig::VectorOf< double > &  tCenter 
)
protected

Appends a target vector t to the Bottle

Definition at line 8 of file subSystem_KARMA.cpp.

◆ applySafetyMargins()

yarp::sig::VectorOf< double > icubclient::SubSystem_KARMA::applySafetyMargins ( const yarp::sig::VectorOf< double > &  in)

Applies safety margins, i.e.

the in vector should be at least table height and at least 0.1m in front of the iCub

Parameters
in"Unsafe" vector
Returns
"safe" vector

Definition at line 172 of file subSystem_KARMA.cpp.

◆ chooseArm()

bool icubclient::SubSystem_KARMA::chooseArm ( const std::string &  armType)

chooseArm (toolAttach in KARMA): wrapper for tool-attach of KARMA, can be used to choose the arm for actions with KARMA

Parameters
armTypestring value of "left" or "right" arm

Definition at line 236 of file subSystem_KARMA.cpp.

◆ chooseArmAuto()

void icubclient::SubSystem_KARMA::chooseArmAuto ( )

chooseArmAuto (toolRemove in KARMA): wrapper for tool-remove of Karma, use to clear the arm choise

Definition at line 248 of file subSystem_KARMA.cpp.

◆ Close()

void icubclient::SubSystem_KARMA::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 152 of file subSystem_KARMA.cpp.

◆ connect()

bool icubclient::SubSystem_KARMA::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 82 of file subSystem_KARMA.cpp.

◆ draw()

bool icubclient::SubSystem_KARMA::draw ( const yarp::sig::VectorOf< double > &  targetCenter,
const double  theta,
const double  radius,
const double  dist,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

draw (KARMA): draw action, along the positive direction of the x-axis (in robot FoR)

Parameters
targetCentercenter of a circle
thetaangle between the y-axis (in robot FoR) and starting position of draw action.
radiusradius of the circle with center at
See also
targetCenter
Parameters
distmoving distance of draw action
optionsto be passed to KARMA
Returns
true in case of success release, false otherwise

Definition at line 407 of file subSystem_KARMA.cpp.

◆ openCartesianClient()

bool icubclient::SubSystem_KARMA::openCartesianClient ( )

Definition at line 449 of file subSystem_KARMA.cpp.

◆ pullBack()

bool icubclient::SubSystem_KARMA::pullBack ( const std::string &  objName,
const yarp::sig::VectorOf< double > &  objCenter,
const double &  targetPosXBack,
const std::string &  armType = "selectable",
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

pullBack (KARMA): pull an object to a certain location along x-axis of robot RoF

Parameters
objNamename of object to pull (can be empty, in this case no correction is applied by iolReachingCalibration)
objCentercoordinate of object
targetPosXBackx coordinate of location to pull object to
armType"left" or "right" arm to conduct action, otherwise arm will be chosen by KARMA
optionsto be passed to KARMA
Returns
true in case of success release, false otherwise

Definition at line 365 of file subSystem_KARMA.cpp.

◆ push()

bool icubclient::SubSystem_KARMA::push ( const yarp::sig::VectorOf< double > &  targetCenter,
const double  theta,
const double  radius,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

push (KARMA): push to certain position, along a defined direction

Parameters
targetCenterposition to push to.
thetaangle between the y-axis (in robot FoR) and starting position of push action, defines the direction of push action
radiusradius of the circle with center at
See also
targetCenter
Parameters
optionsto be passed to KARMA
Returns
true in case of success release, false otherwise

Definition at line 345 of file subSystem_KARMA.cpp.

◆ pushAside()

bool icubclient::SubSystem_KARMA::pushAside ( const std::string &  objName,
const yarp::sig::VectorOf< double > &  objCenter,
const double &  targetPosY,
const double &  theta,
const std::string &  armType = "selectable",
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

pushAside (KARMA): push an object to a certain location along y-axis of robot RoF

Parameters
objNamename of object (can be empty, in this case no correction is applied by iolReachingCalibration)
objCentercoordinate of object
targetPosYy coordinate of location to push object to
thetaangle to define pushing left (0) or right (180)
armType"left" or "right" arm to conduct action, otherwise arm will be chosen by KARMA
optionsto be passed to KARMA
Returns
true in case of success release, false otherwise

Definition at line 260 of file subSystem_KARMA.cpp.

◆ pushFront()

bool icubclient::SubSystem_KARMA::pushFront ( const std::string &  objName,
const yarp::sig::VectorOf< double > &  objCenter,
const double &  targetPosXFront,
const std::string &  armType = "selectable",
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

pushFront (KARMA): push an object to a certain location along x-axis of robot RoF

Parameters
objNamename of object (can be empty, in this case no correction is applied by iolReachingCalibration)
objCentercoordinate of object
targetPosXFrontx coordinate of location to push object to
armType"left" or "right" arm to conduct action, otherwise arm will be chosen by KARMA
optionsto be passed to KARMA
Returns
true in case of success release, false otherwise

Definition at line 303 of file subSystem_KARMA.cpp.

◆ returnArmSafely()

bool icubclient::SubSystem_KARMA::returnArmSafely ( std::string  armType)
protected

Definition at line 180 of file subSystem_KARMA.cpp.

◆ selectHandCorrectTarget()

void icubclient::SubSystem_KARMA::selectHandCorrectTarget ( yarp::os::Bottle &  options,
const std::string &  targetName,
yarp::sig::VectorOf< double > &  target,
const std::string  handToUse = "" 
)
protected

Definition at line 21 of file subSystem_KARMA.cpp.

◆ sendCmd()

bool icubclient::SubSystem_KARMA::sendCmd ( yarp::os::Bottle &  cmd)
protected

Sends a command to KARMA's RPC port.

Parameters
cmdCommand to be sent
Returns
True if successful

Definition at line 71 of file subSystem_KARMA.cpp.

◆ vdraw()

bool icubclient::SubSystem_KARMA::vdraw ( const std::string &  objName,
const yarp::sig::VectorOf< double > &  targetCenter,
const double  theta,
const double  radius,
const double  dist,
const yarp::os::Bottle &  options = yarp::os::Bottle() 
)

vdraw (KARMA): virtual draw action, along the positive direction of the x-axis (in robot FoR)

Parameters
targetCentercenter of a circle
thetaangle between the y-axis (in robot FoR) and starting position of draw action.
radiusradius of the circle with center at
See also
targetCenter
Parameters
distmoving distance of draw action
optionsto be passed to KARMA
objNamename of object to push (can be empty, in this case no correction is applied by iolReachingCalibration)
Returns
true in case of success release, false otherwise

Definition at line 427 of file subSystem_KARMA.cpp.

Member Data Documentation

◆ AREconnected

bool icubclient::SubSystem_KARMA::AREconnected
protected

Definition at line 47 of file subSystem_KARMA.h.

◆ driverHL

yarp::dev::PolyDriver icubclient::SubSystem_KARMA::driverHL
protected

Definition at line 61 of file subSystem_KARMA.h.

◆ driverHR

yarp::dev::PolyDriver icubclient::SubSystem_KARMA::driverHR
protected

Definition at line 62 of file subSystem_KARMA.h.

◆ driverL

yarp::dev::PolyDriver icubclient::SubSystem_KARMA::driverL
protected

Definition at line 59 of file subSystem_KARMA.h.

◆ driverR

yarp::dev::PolyDriver icubclient::SubSystem_KARMA::driverR
protected

Definition at line 60 of file subSystem_KARMA.h.

◆ hasTable

bool icubclient::SubSystem_KARMA::hasTable
protected

Definition at line 51 of file subSystem_KARMA.h.

◆ iCartCtrlL

yarp::dev::ICartesianControl* icubclient::SubSystem_KARMA::iCartCtrlL
protected

Definition at line 64 of file subSystem_KARMA.h.

◆ iCartCtrlR

yarp::dev::ICartesianControl* icubclient::SubSystem_KARMA::iCartCtrlR
protected

Definition at line 65 of file subSystem_KARMA.h.

◆ portCalib

yarp::os::RpcClient icubclient::SubSystem_KARMA::portCalib
protected

Definition at line 56 of file subSystem_KARMA.h.

◆ portFinder

yarp::os::RpcClient icubclient::SubSystem_KARMA::portFinder
protected

Definition at line 55 of file subSystem_KARMA.h.

◆ portStop

yarp::os::RpcClient icubclient::SubSystem_KARMA::portStop
protected

Definition at line 53 of file subSystem_KARMA.h.

◆ portVision

yarp::os::RpcClient icubclient::SubSystem_KARMA::portVision
protected

Definition at line 54 of file subSystem_KARMA.h.

◆ robot

std::string icubclient::SubSystem_KARMA::robot
protected

Definition at line 49 of file subSystem_KARMA.h.

◆ SubARE

SubSystem_ARE* icubclient::SubSystem_KARMA::SubARE
protected

Definition at line 46 of file subSystem_KARMA.h.

◆ tableHeight

double icubclient::SubSystem_KARMA::tableHeight
protected

Definition at line 50 of file subSystem_KARMA.h.

◆ icubclient::SubSystem_Recog

class icubclient::SubSystem_Recog

Abstract subSystem for speech recognizer.

Definition at line 34 of file subSystem_recog.h.

+ Inheritance diagram for icubclient::SubSystem_Recog:

Public Member Functions

 SubSystem_Recog (const std::string &masterName)
 Default constructor. More...
 
virtual void Close ()
 Clean up resources. More...
 
void enableEars (bool on)
 Send a command to ears whether it should listen to the speechRecognizer. More...
 
void waitForEars ()
 Send a command to ears that it should stop listening to the speechRecognizer, and wait until it hands back control. More...
 
bool interruptSpeechRecognizer ()
 Interrupt the speech recognizer. More...
 
yarp::os::Bottle recogFromGrammar (std::string &sInput)
 From one grxml grammar, return the sentence recognized for one timeout This is not supported, use SubSystem_Recog::recogFromGrammarLoop() instead! More...
 
yarp::os::Bottle recogFromGrammarLoop (std::string sInput, int iLoop=50, bool keepEarsEnabled=false, bool keepEarsDisabledAfterRecog=false)
 From one grxml grammar, return the first non-empty sentence recognized can last for several timeout (by default 50) More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Member Functions

virtual bool connect ()
 

Protected Attributes

yarp::os::RpcClient ears_port
 Port to /ears/rpc. More...
 
- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_Recog()

icubclient::SubSystem_Recog::SubSystem_Recog ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 22 of file subSystem_recog.cpp.

Member Function Documentation

◆ Close()

void icubclient::SubSystem_Recog::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 28 of file subSystem_recog.cpp.

◆ connect()

bool icubclient::SubSystem_Recog::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 4 of file subSystem_recog.cpp.

◆ enableEars()

void icubclient::SubSystem_Recog::enableEars ( bool  on)

Send a command to ears whether it should listen to the speechRecognizer.

Parameters
onIf true, ears will take control of speechRecognizer

Definition at line 35 of file subSystem_recog.cpp.

◆ interruptSpeechRecognizer()

bool icubclient::SubSystem_Recog::interruptSpeechRecognizer ( )

Interrupt the speech recognizer.

This can be used to faster get back control of the speech recognizer if it is used by another module currently (e.g. ears).

Returns

Definition at line 74 of file subSystem_recog.cpp.

◆ recogFromGrammar()

yarp::os::Bottle icubclient::SubSystem_Recog::recogFromGrammar ( std::string &  sInput)

From one grxml grammar, return the sentence recognized for one timeout This is not supported, use SubSystem_Recog::recogFromGrammarLoop() instead!

Definition at line 88 of file subSystem_recog.cpp.

◆ recogFromGrammarLoop()

yarp::os::Bottle icubclient::SubSystem_Recog::recogFromGrammarLoop ( std::string  sInput,
int  iLoop = 50,
bool  keepEarsEnabled = false,
bool  keepEarsDisabledAfterRecog = false 
)

From one grxml grammar, return the first non-empty sentence recognized can last for several timeout (by default 50)

Parameters
sInputthe grxml grammar in string form
iLoopMaximum number of loops before giving up to recognize input. If -1, loop indefinitely
keepEarsEnabledWhether ears should stay in control. This should only be set to true by ears itself
keepEarsDisabledAfterRecogIf false, ears will be enabled again after an input was recognized. This can be set to true if a module wants to recognize several commands in a row without ever handing back control to ears.

Definition at line 116 of file subSystem_recog.cpp.

◆ waitForEars()

void icubclient::SubSystem_Recog::waitForEars ( )

Send a command to ears that it should stop listening to the speechRecognizer, and wait until it hands back control.

Definition at line 57 of file subSystem_recog.cpp.

Member Data Documentation

◆ ears_port

yarp::os::RpcClient icubclient::SubSystem_Recog::ears_port
protected

Port to /ears/rpc.

Definition at line 38 of file subSystem_recog.h.

◆ icubclient::SubSystem_SAM

class icubclient::SubSystem_SAM

SubSystem for SAM.

Definition at line 33 of file subSystem_SAM.h.

+ Inheritance diagram for icubclient::SubSystem_SAM:

Public Member Functions

 SubSystem_SAM (const std::string &masterName)
 Default constructor. More...
 
virtual void Close ()
 Clean up resources. More...
 
bool attentionModulation (const std::string &mode)
 Method to switch attention modes for SAM. More...
 
yarp::os::Bottle askXLabel (const std::string &model)
 Method to trigger a classification from SAM. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Public Attributes

bool attentionSAM
 

Protected Member Functions

virtual bool connect ()
 

Friends

class ICubClient
 

Additional Inherited Members

- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Constructor & Destructor Documentation

◆ SubSystem_SAM()

icubclient::SubSystem_SAM::SubSystem_SAM ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 13 of file subSystem_SAM.cpp.

Member Function Documentation

◆ askXLabel()

yarp::os::Bottle icubclient::SubSystem_SAM::askXLabel ( const std::string &  model)

Method to trigger a classification from SAM.

Parameters
modelModel name to trigger a classification for
Returns
Bottle with success as string as first value and classification as std::string as second value

Definition at line 56 of file subSystem_SAM.cpp.

◆ attentionModulation()

bool icubclient::SubSystem_SAM::attentionModulation ( const std::string &  mode)

Method to switch attention modes for SAM.

Parameters
modeAllowed modes are stop and continue.
Returns
true if command was send successful.

Definition at line 23 of file subSystem_SAM.cpp.

◆ Close()

void icubclient::SubSystem_SAM::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 18 of file subSystem_SAM.cpp.

◆ connect()

bool icubclient::SubSystem_SAM::connect ( )
protectedvirtual

Implements icubclient::SubSystem.

Definition at line 5 of file subSystem_SAM.cpp.

Friends And Related Function Documentation

◆ ICubClient

friend class ICubClient
friend

Definition at line 35 of file subSystem_SAM.h.

Member Data Documentation

◆ attentionSAM

bool icubclient::SubSystem_SAM::attentionSAM

Definition at line 41 of file subSystem_SAM.h.

◆ icubclient::SubSystem_Speech

class icubclient::SubSystem_Speech

Abstract subSystem for speech management (Text to Speech)

Definition at line 38 of file subSystem_speech.h.

+ Inheritance diagram for icubclient::SubSystem_Speech:

Public Member Functions

 SubSystem_Speech (const std::string &masterName)
 Default constructor. More...
 
virtual bool connect ()
 
virtual void TTS (const std::string &text, bool shouldWait=true)
 Produce text to speech output. More...
 
void SetOptions (const std::string &custom)
 Set the command line options sent by iSpeak. More...
 
bool isSpeaking ()
 Check if iSpeak is currently speaking. More...
 
virtual void Close ()
 Clean up resources. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Attributes

yarp::os::Port tts
 Port to /iSpeak. More...
 
- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ SubSystem_Speech()

icubclient::SubSystem_Speech::SubSystem_Speech ( const std::string &  masterName)

Default constructor.

Parameters
masterNamestem-name used to open up ports.

Definition at line 4 of file subSystem_speech.cpp.

Member Function Documentation

◆ Close()

void icubclient::SubSystem_Speech::Close ( )
virtual

Clean up resources.

Implements icubclient::SubSystem.

Definition at line 77 of file subSystem_speech.cpp.

◆ connect()

bool icubclient::SubSystem_Speech::connect ( )
virtual

Implements icubclient::SubSystem.

Definition at line 11 of file subSystem_speech.cpp.

◆ isSpeaking()

bool icubclient::SubSystem_Speech::isSpeaking ( )

Check if iSpeak is currently speaking.

Definition at line 70 of file subSystem_speech.cpp.

◆ SetOptions()

void icubclient::SubSystem_Speech::SetOptions ( const std::string &  custom)

Set the command line options sent by iSpeak.

Parameters
customThe options as a string

Definition at line 58 of file subSystem_speech.cpp.

◆ TTS()

void icubclient::SubSystem_Speech::TTS ( const std::string &  text,
bool  shouldWait = true 
)
virtual

Produce text to speech output.

Parameters
textThe text to be said.
shouldWaitIs the function blocking until the end of the sentence or not.

Definition at line 27 of file subSystem_speech.cpp.

Member Data Documentation

◆ tts

yarp::os::Port icubclient::SubSystem_Speech::tts
protected

Port to /iSpeak.

Definition at line 41 of file subSystem_speech.h.

◆ icubclient::SubSystem_Speech_eSpeak

class icubclient::SubSystem_Speech_eSpeak

SubSystem for speech synthesis with emotional tuning of speed and pitch using eSpeak.

Definition at line 79 of file subSystem_speech.h.

+ Inheritance diagram for icubclient::SubSystem_Speech_eSpeak:

Public Member Functions

 SubSystem_Speech_eSpeak (std::string &masterName)
 
void SetVoiceParameters (int speed=100, int pitch=50, std::string voice="en")
 
- Public Member Functions inherited from icubclient::SubSystem_Speech
 SubSystem_Speech (const std::string &masterName)
 Default constructor. More...
 
virtual bool connect ()
 
virtual void TTS (const std::string &text, bool shouldWait=true)
 Produce text to speech output. More...
 
void SetOptions (const std::string &custom)
 Set the command line options sent by iSpeak. More...
 
bool isSpeaking ()
 Check if iSpeak is currently speaking. More...
 
virtual void Close ()
 Clean up resources. More...
 
- Public Member Functions inherited from icubclient::SubSystem
 SubSystem (const std::string &masterName)
 
virtual ~SubSystem ()
 
bool Connect ()
 Connects the subsystem to its "host". More...
 
std::string getType () const
 Return the type of the subsystem as string. More...
 

Protected Attributes

int m_speed
 
int m_pitch
 
- Protected Attributes inherited from icubclient::SubSystem_Speech
yarp::os::Port tts
 Port to /iSpeak. More...
 
- Protected Attributes inherited from icubclient::SubSystem
std::string m_masterName
 
std::string m_type
 
yarp::os::RpcClient portRPC
 

Additional Inherited Members

Constructor & Destructor Documentation

◆ SubSystem_Speech_eSpeak()

icubclient::SubSystem_Speech_eSpeak::SubSystem_Speech_eSpeak ( std::string &  masterName)
inline

Definition at line 87 of file subSystem_speech.h.

Member Function Documentation

◆ SetVoiceParameters()

void icubclient::SubSystem_Speech_eSpeak::SetVoiceParameters ( int  speed = 100,
int  pitch = 50,
std::string  voice = "en" 
)
inline

Definition at line 93 of file subSystem_speech.h.

Member Data Documentation

◆ m_pitch

int icubclient::SubSystem_Speech_eSpeak::m_pitch
protected

Definition at line 83 of file subSystem_speech.h.

◆ m_speed

int icubclient::SubSystem_Speech_eSpeak::m_speed
protected

Definition at line 82 of file subSystem_speech.h.