Revision 8db9ba4f src/server/middleware_rsb.cpp

View differences:

src/server/middleware_rsb.cpp
46 46
using namespace rsb;
47 47
using namespace rsb::patterns;
48 48

  
49
WARNING: RSB interface might be deprtecated and needs some backporting
50
from the ROS code. [todo]
51

  
49 52
//! constructor
50 53
MiddlewareRSB::MiddlewareRSB(string scope, Controller *c) : Middleware(scope, c){
51 54
    printf("> using RSB middleware\n");
......
114 117

  
115 118
    GazeState gaze_state;
116 119

  
117
    if (msg->type() == rst::robot::HumotionGazeTarget::ABSOLUTE){
118
        gaze_state.type = GazeState::ABSOLUTE;
120
    if (msg->gaze_type() == rst::robot::HumotionGazeTarget::ABSOLUTE){
121
        gaze_state.gaze_type = GazeState::ABSOLUTE;
119 122
    }else{
120
        gaze_state.type = GazeState::RELATIVE;
123
        gaze_state.gaze_type = GazeState::RELATIVE;
121 124
    }
122 125

  
123 126
    gaze_state.pan  = msg->pan();
......
138 141
    gaze_state.eyeblink_request_left = msg->eyeblink_request_left();
139 142
    gaze_state.eyeblink_request_right = msg->eyeblink_request_right();
140 143

  
141
    gaze_state.timestamp = event->getMetaData().getCreateTime() / 1000.0; //createTime() returns milliseconds -> convert to seconds
144
    gaze_state.timestamp = msg->gaze_timestamp(); FIXME: convert RSB timestamp to our representation
145
    //event->getMetaData().getCreateTime() / 1000.0; //createTime() returns milliseconds -> convert to seconds
142 146

  
143 147
    controller->set_gaze_target(gaze_state);
144 148
}

Also available in: Unified diff