CURG-archive / graspit_handop

Other
1 stars 2 forks source link

Allow GA code to generate different finger lengths #3

Closed jon-weisz closed 11 years ago

jon-weisz commented 11 years ago

How exactly to do this is open to some kind of interpretation. Not sure how to do it yet.

jon-weisz commented 11 years ago

For now we are going to try to do this using a uniform random variable. This should go in to the eigenhand_genetic_algorithm.py:Ga_hand.

Something like: reduction_probability_threshold = .1 expansion_probability_threshold = .1 max_phalanges = 4 min_phalanges = 2 for i in range(num_fingers): num_phalanges = (len(link_len_list) -2)//2 if probability < reduction_probability_threshold and num_phalanges > min_phalanges:: phalange_index = sample.randint(num_phalanges) new_finger = remove_phalange(finger, phalange_index) .... Now do something similar for expanding the finger