Revision 21444915 src/server/eye_motion_generator.cpp

View differences:

src/server/eye_motion_generator.cpp
60 60
    float max_accel = fmin(80000.0, 1526.53*distance_abs + 10245.4);
61 61

  
62 62
    //feed reflexxes api with data
63
    reflexxes_set_input(dof, target, max_speed, max_accel);
63
    reflexxes_set_input(dof, target, now, max_speed, max_accel);
64 64
}
65 65

  
66 66
//! calculate joint targets
......
100 100
    setup_eyemotion(0, eye_pan_l_target, eye_pan_l_now);
101 101
    setup_eyemotion(1, eye_pan_r_target, eye_pan_r_now);
102 102
    setup_eyemotion(2, eye_tilt_target, eye_tilt_now);
103
    cout << "EYE MOTION 2 " << eye_tilt_target << " now=" << eye_tilt_now << "\n";
103 104

  
104 105
    //call reflexxes to handle profile calculation:
105 106
    reflexxes_calculate_profile();
106 107

  
107 108
    //tell the joint about the new values:
108
    joint_interface->set_target_position(JointInterface::ID_EYES_LEFT_LR, reflexxes_position_output->NewPositionVector->VecData[0]);
109
    joint_interface->set_target_position(JointInterface::ID_EYES_RIGHT_LR, reflexxes_position_output->NewPositionVector->VecData[1]);
110
    joint_interface->set_target_position(JointInterface::ID_EYES_BOTH_UD,  reflexxes_position_output->NewPositionVector->VecData[2]);
109
    joint_interface->set_target_position(JointInterface::ID_EYES_LEFT_LR,
110
                                         reflexxes_position_output->NewPositionVector->VecData[0],
111
                                         reflexxes_position_output->NewVelocityVector->VecData[0]);
112
    joint_interface->set_target_position(JointInterface::ID_EYES_RIGHT_LR,
113
                                         reflexxes_position_output->NewPositionVector->VecData[1],
114
                                         reflexxes_position_output->NewVelocityVector->VecData[1]);
115
    joint_interface->set_target_position(JointInterface::ID_EYES_BOTH_UD,
116
                                         reflexxes_position_output->NewPositionVector->VecData[2],
117
                                         reflexxes_position_output->NewVelocityVector->VecData[2]);
118

  
119
    cout << reflexxes_position_output->NewPositionVector->VecData[2] << " " << reflexxes_position_output->NewVelocityVector->VecData[2] ;
111 120
}
112 121

  
113 122

  

Also available in: Unified diff