Revision f311c844

View differences:

cfg/humotion.cfg
6 6
def fetch_default(param_name):
7 7
    for line in open("../src/server/config.cpp"):
8 8
        if param_name in line:
9
            result = re.findall("=\s*([\d.]+);", line)
9
            result = re.findall("=\s*([\d\w.]+);", line)
10 10
            print result
11 11
            if result:
12 12
                return result[0]
examples/yarp_icub/src/icub_jointinterface.cpp
108 108
        insert_icupid_to_humotionid_mapping(ICUB_ID_NECK_PAN,    ID_NECK_PAN);
109 109
        insert_icupid_to_humotionid_mapping(ICUB_ID_NECK_TILT,   ID_NECK_TILT);
110 110
        insert_icupid_to_humotionid_mapping(ICUB_ID_NECK_ROLL,   ID_NECK_ROLL);
111
        // FIXME: remove this hack tha repurposes LEFT/RIGHT eye pan from humotion as vergence/pan
111
        //
112 112
        insert_icupid_to_humotionid_mapping(ICUB_ID_EYES_PAN,   ID_EYES_LEFT_LR);
113 113
        insert_icupid_to_humotionid_mapping(ICUB_ID_EYES_VERGENCE,   ID_EYES_RIGHT_LR);
114 114
        insert_icupid_to_humotionid_mapping(ICUB_ID_EYES_BOTH_UD,   ID_EYES_BOTH_UD);
src/server/eyelid_motion_generator.cpp
60 60
    // fetch current angles
61 61
    float eye_tilt_now  = get_current_position(JointInterface::ID_EYES_BOTH_UD);
62 62

  
63
    float eyelid_target = 0.0;
64
    if (config->eyelids_follow_eyemotion) {
65
        // the eyelids shoudl follow the eye motion
66
        // therefore copy the eyeballs tilt position
67
        eyelid_target = eye_tilt_now;
68
    }
69

  
63 70
    // calculate left eyelid targets
64
    float eyelid_upper_left_target = eye_tilt_now + requested_gaze_state_.eyelid_opening_upper;
65
    float eyelid_lower_left_target = eye_tilt_now - requested_gaze_state_.eyelid_opening_lower;
71
    float eyelid_upper_left_target = eyelid_target + requested_gaze_state_.eyelid_opening_upper;
72
    float eyelid_lower_left_target = eyelid_target - requested_gaze_state_.eyelid_opening_lower;
66 73

  
67 74
    // calculate right eyelid targets
68
    float eyelid_upper_right_target = eye_tilt_now + requested_gaze_state_.eyelid_opening_upper;
69
    float eyelid_lower_right_target = eye_tilt_now - requested_gaze_state_.eyelid_opening_lower;
75
    float eyelid_upper_right_target = eyelid_target + requested_gaze_state_.eyelid_opening_upper;
76
    float eyelid_lower_right_target = eyelid_target - requested_gaze_state_.eyelid_opening_lower;
70 77

  
71 78
    // limit target angles
72 79
    eyelid_upper_left_target  = limit_target(JointInterface::ID_EYES_LEFT_LID_UPPER,
src/server/middleware_ros.cpp
101 101
    config->breath_period = dyn_config.breath_period;
102 102
    config->breath_amplitude = dyn_config.breath_amplitude;
103 103

  
104
    // parameters for eyelids
105
    config->eyelids_follow_eyemotion = dyn_config.eyelids_follow_eyemotion;
106

  
104 107
    // parameters for eye blinking
105 108
    config->eyeblink_duration = dyn_config.eyeblink_duration;
106 109
    config->eyeblink_periodic_distribution_lower = dyn_config.eyeblink_periodic_distribution_lower;

Also available in: Unified diff