Revision 0c8d22a5 examples/yarp_icub/src/icub_jointinterface.cpp

View differences:

examples/yarp_icub/src/icub_jointinterface.cpp
321 321
    for (int i = ICUB_ID_NECK_TILT; i <= ICUB_ID_EYES_VERGENCE; i++) {
322 322
        set_target_in_velocitymode(i);
323 323
    }
324
/*
324

  
325 325
    // eyelids: unfortuantely the icub has only 1dof for eyelids
326 326
    // therefore we can only use an opening value
327 327
    float opening_left  = target_angle_[ICUB_ID_EYES_LEFT_LID_UPPER]
......
338 338

  
339 339
    //mouth
340 340
    face_interface_->set_mouth(target_angle_);
341
*/
342 341

  
343 342
    // store joint values which we do not handle on icub here:
344 343
    double timestamp = humotion::Timestamp::now().to_seconds();
......
420 419
    double min, max;
421 420
    int humotion_id = convert_icub_jointid_to_humotion(icub_id);
422 421

  
423
    ilimits->getLimits(icub_id, &min, &max);
422
    if (!ilimits->getLimits(icub_id, &min, &max)) {
423
        cerr << "ERROR: failed to call getLimits for icub joint " << icub_id << "\n";
424
        exit(EXIT_FAILURE);
425
    }
426

  
424 427
    joint_min[humotion_id] = min;
425 428
    joint_max[humotion_id] = max;
426 429
}

Also available in: Unified diff