Revision c65b5f82
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 |
|
|
51 | 45 |
void call(const GoalConstPtr &goal){ |
52 | 46 |
feedback.result = 1; |
53 | 47 |
|
... | ... | |
62 | 56 |
gaze_state.roll = request->roll; |
63 | 57 |
|
64 | 58 |
//use timestamp from request |
65 |
gaze_state.timestamp = convert_ros_to_timestamp_ms(request->timestamp); //get_timestamp();
|
|
59 |
gaze_state.timestamp = request->timestamp.toSec(); //get_timestamp();
|
|
66 | 60 |
if (request->gaze_type == hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE){ |
67 | 61 |
gaze_state.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; |
68 | 62 |
}else{ |
Also available in: Unified diff