11 #ifndef __EMOTIONINTERFACEMODULE__
12 #define __EMOTIONINTERFACEMODULE__
22 #include <yarp/os/all.h>
23 #include <yarp/dev/PolyDriver.h>
24 #include <yarp/dev/IPositionControl.h>
25 #include <yarp/sig/all.h>
27 using namespace yarp::os;
28 using namespace yarp::sig;
60 virtual void report(
const PortInfo &info);
82 BufferedPort<Bottle> _outputPort;
85 size_t _highlevelemotions{};
86 size_t _numberOfColors{};
87 size_t _eyebrowmaskemotions{};
88 size_t _mouthmaskemotions{};
92 std::map<std::string, std::string > _bitmask_emotion_table;
93 std::map<std::string, std::string > _color_table;
99 int _initEmotionTrigger{};
102 yarp::dev::PolyDriver _poly;
103 yarp::dev::IPositionControl* _iPos{
nullptr };
104 double _min{ 0.0 }, _max{ 0.0 };
105 size_t _joint_eylids{ 0 };
109 int getIndex(std::string
cmd);
110 bool writePort(
const char*
cmd);
111 double getEyelidsTarget(
const char eli0,
const char eli1);
118 bool configure(ResourceFinder& config)
override;
119 bool close()
override;
120 bool interruptModule()
override;
121 bool updateModule()
override;
122 double getPeriod()
override;
123 bool respond(
const Bottle &command,Bottle &reply)
override;
127 bool setLeftEyebrow(
const std::string
cmd)
override;
128 bool setRightEyebrow(
const std::string
cmd)
override;
129 bool setEyelids(
const std::string
cmd)
override;
130 bool setMouth(
const std::string
cmd)
override;
131 bool setAll(
const std::string
cmd)
override;
132 bool setRaw(
const std::string
cmd)
override;
134 bool setColor(
const string&
cmd);
135 bool setBrightness(
const string&
cmd);
136 bool setMask(
const Bottle&
cmd);
EmotionInitReport(EmotionInterfaceModule *_emo)
EmotionInterface Module class.
~EmotionInterfaceModule() override=default
Interface for the Facial Expressions.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.