Revision 1f748ce7 examples/yarp_icub/src/icub_jointinterface.cpp

View differences:

examples/yarp_icub/src/icub_jointinterface.cpp
298 298
    //printf("> TARGET PAN = %3.2f\n",target_angle[ICUB_ID_NECK_PAN]);
299 299

  
300 300

  
301
    //eyelids: unfortuantely the icub has only 1dof for eyelids, so we use only one dof here:
302
    face_interface_->set_eyelid_angle(target_angle_[ICUB_ID_EYES_RIGHT_LID_UPPER]);
301
    // eyelids: unfortuantely the icub has only 1dof for eyelids
302
    // therefore we can only use an opening value
303
    float opening_left  = target_angle_[ICUB_ID_EYES_LEFT_LID_UPPER]
304
                          - target_angle_[ICUB_ID_EYES_LEFT_LID_LOWER];
305
    float opening_right = target_angle_[ICUB_ID_EYES_RIGHT_LID_UPPER]
306
                          - target_angle_[ICUB_ID_EYES_RIGHT_LID_LOWER];
307
    float opening = (opening_left + opening_right) / 2.0;
308
    // send it to icub face if
309
    face_interface_->set_eyelid_angle(opening);
303 310

  
304 311
    //eyebrows are set using a special command as well:
305 312
    face_interface_->set_eyebrow_angle(ICUB_ID_EYES_LEFT_BROW, target_angle_);

Also available in: Unified diff