Revision 6353defa src/server/middleware_ros.cpp

View differences:

src/server/middleware_ros.cpp
98 98
    controller->set_mouth_target(mouth_state);
99 99
}
100 100

  
101
//! this provides a consistent transformation of ros ts to double
102
double MiddlewareROS::convert_ros_to_timestamp_ms(ros::Time t){
103
        return t.sec + t.nsec/1000000000.0;
104
}
105 101

  
106 102
//! callback to handle incoming gaze  target
107 103
void MiddlewareROS::incoming_gaze_target(const humotion::gaze::ConstPtr& msg){
......
131 127
    }else{
132 128
        gaze_state.gaze_type = GazeState::GAZETYPE_RELATIVE;
133 129
    }
134
    gaze_state.timestamp = convert_ros_to_timestamp_ms(msg->header.stamp);
130
    gaze_state.timestamp = msg->header.stamp.toSec();
135 131

  
136 132
    controller->set_gaze_target(gaze_state);
137 133

  

Also available in: Unified diff