Revision 482adb6d client/cpp/src/MiddlewareRSB.cpp
| client/cpp/src/MiddlewareRSB.cpp | ||
|---|---|---|
| 93 | 93 |
} |
| 94 | 94 |
|
| 95 | 95 |
void MiddlewareRSB::publish_emotion(string scope_target, RobotEmotion e, bool blocking) {
|
| 96 |
boost::shared_ptr<rst::animation::EmotionExpression> request(new rst::animation::EmotionExpression());
|
|
| 96 |
std::shared_ptr<rst::animation::EmotionExpression> request(new rst::animation::EmotionExpression());
|
|
| 97 | 97 |
|
| 98 | 98 |
switch (e.value) {
|
| 99 | 99 |
default: |
| ... | ... | |
| 138 | 138 |
} |
| 139 | 139 |
|
| 140 | 140 |
void MiddlewareRSB::publish_gaze_target(RobotGaze incoming_target, bool blocking) {
|
| 141 |
boost::shared_ptr<rst::animation::BinocularHeadGaze> request(new rst::animation::BinocularHeadGaze());
|
|
| 141 |
std::shared_ptr<rst::animation::BinocularHeadGaze> request(new rst::animation::BinocularHeadGaze());
|
|
| 142 | 142 |
|
| 143 |
boost::shared_ptr<rst::geometry::SphericalDirectionFloat> target(new rst::geometry::SphericalDirectionFloat());
|
|
| 143 |
std::shared_ptr<rst::geometry::SphericalDirectionFloat> target(new rst::geometry::SphericalDirectionFloat());
|
|
| 144 | 144 |
target->set_azimuth(incoming_target.pan); |
| 145 | 145 |
target->set_elevation(incoming_target.tilt); |
| 146 | 146 |
request->set_allocated_target(target.get()); |
| 147 | 147 |
|
| 148 | 148 |
request->set_eye_vergence(incoming_target.vergence); |
| 149 | 149 |
|
| 150 |
boost::shared_ptr<rst::geometry::SphericalDirectionFloat> offset(new rst::geometry::SphericalDirectionFloat());
|
|
| 150 |
std::shared_ptr<rst::geometry::SphericalDirectionFloat> offset(new rst::geometry::SphericalDirectionFloat());
|
|
| 151 | 151 |
offset->set_azimuth(incoming_target.pan_offset); |
| 152 | 152 |
offset->set_elevation(incoming_target.tilt_offset); |
| 153 | 153 |
request->set_allocated_offset(offset.get()); |
| ... | ... | |
| 166 | 166 |
|
| 167 | 167 |
void MiddlewareRSB::publish_mouth_target(RobotMouth target, bool blocking) {
|
| 168 | 168 |
/* |
| 169 |
boost::shared_ptr<rst::robot::MouthTarget> request(new rst::robot::MouthTarget());
|
|
| 169 |
std::shared_ptr<rst::robot::MouthTarget> request(new rst::robot::MouthTarget());
|
|
| 170 | 170 |
|
| 171 | 171 |
request->set_position_left( target.position_left); |
| 172 | 172 |
request->set_position_center(target.position_center); |
| ... | ... | |
| 186 | 186 |
} |
| 187 | 187 |
|
| 188 | 188 |
void MiddlewareRSB::publish_head_animation(RobotHeadAnimation a, bool blocking) {
|
| 189 |
boost::shared_ptr<rst::animation::HeadAnimation> request(new rst::animation::HeadAnimation());
|
|
| 189 |
std::shared_ptr<rst::animation::HeadAnimation> request(new rst::animation::HeadAnimation());
|
|
| 190 | 190 |
|
| 191 | 191 |
switch (a.value) {
|
| 192 | 192 |
default: |
| ... | ... | |
| 238 | 238 |
|
| 239 | 239 |
void MiddlewareRSB::publish_speech(string text, bool blocking) {
|
| 240 | 240 |
// say it |
| 241 |
boost::shared_ptr<std::string> request(new string(text));
|
|
| 241 |
std::shared_ptr<std::string> request(new string(text));
|
|
| 242 | 242 |
|
| 243 | 243 |
if (blocking) {
|
| 244 | 244 |
hlrc_server->call<std::string>("speech", request);
|
Also available in: Unified diff