Revision b1a51350 server/include/ROS/GazeCallbackWrapperROS.h
server/include/ROS/GazeCallbackWrapperROS.h | ||
---|---|---|
42 | 42 |
// |
43 | 43 |
}; |
44 | 44 |
|
45 |
//! this provides a consistent transformation of ros ts to double |
|
46 |
double convert_ros_to_timestamp_ms(ros::Time t){ |
|
47 |
return t.sec + t.nsec/1000000000.0; |
|
48 |
} |
|
49 |
|
|
50 |
|
|
45 | 51 |
void call(const GoalConstPtr &goal){ |
46 | 52 |
feedback.result = 1; |
47 | 53 |
|
... | ... | |
55 | 61 |
gaze_state.tilt = request->tilt; |
56 | 62 |
gaze_state.roll = request->roll; |
57 | 63 |
|
58 |
gaze_state.timestamp = get_timestamp(); //FIXME!! |
|
64 |
//use timestamp from request |
|
65 |
gaze_state.timestamp = convert_ros_to_timestamp_ms(request->timestamp); //get_timestamp(); |
|
66 |
if (request->type == hlrc_server::gazetargetGoal::GAZETARGET_RELATIVE){ |
|
67 |
gaze_state.type = humotion::GazeState::RELATIVE; |
|
68 |
}else{ |
|
69 |
gaze_state.type = humotion::GazeState::ABSOLUTE; |
|
70 |
} |
|
59 | 71 |
|
60 | 72 |
//default: |
61 | 73 |
gaze_state.vergence = request->vergence; |
Also available in: Unified diff