Revision 32327f15 src/server/gaze_motion_generator.cpp

View differences:

src/server/gaze_motion_generator.cpp
42 42

  
43 43

  
44 44
//! constructor
45
GazeMotionGenerator::GazeMotionGenerator(JointInterface *j, int dof, float t) : ReflexxesMotionGenerator(j, dof, t){
45
GazeMotionGenerator::GazeMotionGenerator(JointInterface *j, int dof, float t)
46
    : ReflexxesMotionGenerator(j, dof, t){
46 47
}
47 48

  
48 49
//! destructor
......
61 62
    float dist = fabs(requested_gaze_state.distance_pt_abs(new_gaze_target));
62 63

  
63 64
    //check requested speed
64
    float speed = fabs(requested_gaze_state.distance_pt_abs(new_gaze_target)) / (new_gaze_target.timestamp-requested_gaze_state.timestamp);
65
    float speed = fabs(requested_gaze_state.distance_pt_abs(new_gaze_target)) / (new_gaze_target.timestamp.to_seconds()-requested_gaze_state.timestamp.to_seconds());
65 66

  
66 67
    //check magnitude and speed of gaze change to detect eye-neck saccades:
67 68
    if (dist > NECK_SACCADE_THRESHOLD){

Also available in: Unified diff