Revision c5a47e56 client/cpp/src/MiddlewareROS.cpp

View differences:

client/cpp/src/MiddlewareROS.cpp
154 154
    goal.pan_offset = target.pan_offset;
155 155

  
156 156
    //timestamp:
157
    //ts = t.sec + t.nsec/1000000000.0;
158
    uint32_t sec  = (uint32_t) target.timestamp;
159
    uint32_t nsec = (uint32_t)((target.timestamp - sec)*1000000000);
160
    goal.timestamp = ros::Time(sec, nsec);
157
    goal.timestamp = ros::Time(target.timestamp);
161 158

  
162
    if (target.type == RobotGaze::ABSOLUTE){
159
    if (target.gaze_type == RobotGaze::ABSOLUTE){
163 160
        goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE;
164 161
    }else{
165 162
        goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_RELATIVE;

Also available in: Unified diff