Revision 35b3ca25 src/server/eyelid_motion_generator.cpp

View differences:

src/server/eyelid_motion_generator.cpp
77 77
    //limit target angles:
78 78
    eyelid_upper_left_target  = limit_target(JointInterface::ID_EYES_LEFT_LID_UPPER,  eyelid_upper_left_target);
79 79
    eyelid_lower_left_target  = limit_target(JointInterface::ID_EYES_LEFT_LID_LOWER,  eyelid_lower_left_target);
80
    eyelid_upper_right_target = limit_target(JointInterface::ID_EYES_RIGHT_LID_UPPER,  eyelid_upper_right_target);
81
    eyelid_lower_right_target = limit_target(JointInterface::ID_EYES_RIGHT_LID_LOWER,  eyelid_lower_right_target);
80
    eyelid_upper_right_target = limit_target(JointInterface::ID_EYES_RIGHT_LID_UPPER, eyelid_upper_right_target);
81
    eyelid_lower_right_target = limit_target(JointInterface::ID_EYES_RIGHT_LID_LOWER, eyelid_lower_right_target);
82 82

  
83 83
    //(temporarily) store the target
84
    joint_interface->set_target_position(JointInterface::ID_EYES_LEFT_LID_UPPER,  eyelid_upper_left_target, 0.0);
85
    joint_interface->set_target_position(JointInterface::ID_EYES_LEFT_LID_LOWER,  eyelid_lower_left_target, 0.0);
86
    joint_interface->set_target_position(JointInterface::ID_EYES_RIGHT_LID_UPPER,  eyelid_upper_right_target, 0.0);
87
    joint_interface->set_target_position(JointInterface::ID_EYES_RIGHT_LID_LOWER,  eyelid_lower_right_target, 0.0);
84
    joint_interface->set_target(JointInterface::ID_EYES_LEFT_LID_UPPER,  eyelid_upper_left_target, 0.0);
85
    joint_interface->set_target(JointInterface::ID_EYES_LEFT_LID_LOWER,  eyelid_lower_left_target, 0.0);
86
    joint_interface->set_target(JointInterface::ID_EYES_RIGHT_LID_UPPER, eyelid_upper_right_target, 0.0);
87
    joint_interface->set_target(JointInterface::ID_EYES_RIGHT_LID_LOWER, eyelid_lower_right_target, 0.0);
88 88

  
89 89
    //check for saccade
90 90
    check_for_saccade();
......
221 221
        //use the upper value + 10 deg as close state:
222 222
        value = joint_interface->get_joint_min(JointInterface::ID_EYES_LEFT_LID_UPPER) + 10.0;
223 223
        //overwrite last target_
224
        joint_interface->set_target_position(joint_id, value, 0.0);
224
        joint_interface->set_target(joint_id, value, 0.0);
225 225
        break;
226 226

  
227 227
    case(JointInterface::ID_EYES_RIGHT_LID_UPPER):
......
229 229
        //use the upper value + 10 deg as close state:
230 230
        value = joint_interface->get_joint_min(JointInterface::ID_EYES_RIGHT_LID_UPPER) + 10.0;
231 231
        //overwrite last target_
232
        joint_interface->set_target_position(joint_id, value, 0.0);
232
        joint_interface->set_target(joint_id, value, 0.0);
233 233
        break;
234 234
    }
235 235
}
......
268 268
void EyelidMotionGenerator::publish_targets(){
269 269
    //publish values if there is an active gaze input within the last timerange
270 270
    if (gaze_target_input_active()){
271
        joint_interface->publish_target_position(JointInterface::ID_EYES_LEFT_LID_UPPER);
272
        joint_interface->publish_target_position(JointInterface::ID_EYES_LEFT_LID_LOWER);
273
        joint_interface->publish_target_position(JointInterface::ID_EYES_RIGHT_LID_UPPER);
274
        joint_interface->publish_target_position(JointInterface::ID_EYES_RIGHT_LID_LOWER);
271
        joint_interface->publish_target(JointInterface::ID_EYES_LEFT_LID_UPPER);
272
        joint_interface->publish_target(JointInterface::ID_EYES_LEFT_LID_LOWER);
273
        joint_interface->publish_target(JointInterface::ID_EYES_RIGHT_LID_UPPER);
274
        joint_interface->publish_target(JointInterface::ID_EYES_RIGHT_LID_LOWER);
275 275
    }
276 276
}

Also available in: Unified diff