original_docstring:  create constraint on the ankle position without an orientation constraint
docstring: create constraint on the ankle position without an orientation constraint
docstring_tokens: create constraint on the ankle position without an orientation constraint
code: def generate_grounding_constraint_from_heel(self, frames, ankle_joint_name, heel_joint_name, frame_idx, end_frame):
          """ create constraint on the ankle position without an orientation constraint"""
          #print "add ankle constraint from heel"
          ch = self.get_previous_joint_position_from_buffer(frames, frame_idx, end_frame, heel_joint_name)
          a = self.skeleton.nodes[ankle_joint_name].get_global_position(frames[frame_idx])
          h = self.skeleton.nodes[heel_joint_name].get_global_position(frames[frame_idx])
          ch[1] = self.scene_interface.get_height(ch[0], ch[2])  # set heel constraint on the ground
          target_heel_offset = a - h  # difference between unmodified heel and ankle
          ca = ch + target_heel_offset  # move ankle so heel is on the ground
          #print "set ankle constraint single", ch, ca, target_heel_offset
          constraint = MotionGroundingConstraint(frame_idx, ankle_joint_name, ca, None, None)
          constraint.heel_position = ch
          return constraint
code_tokens: def generate_grounding_constraint_from_heel ( self , frames , ankle_joint_name , heel_joint_name , frame_idx , end_frame ) : ch = self . get_previous_joint_position_from_buffer ( frames , frame_idx , end_frame , heel_joint_name ) a = self . skeleton . nodes [ ankle_joint_name ] . get_global_position ( frames [ frame_idx ] ) h = self . skeleton . nodes [ heel_joint_name ] . get_global_position ( frames [ frame_idx ] ) ch [ 1 ] = self . scene_interface . get_height ( ch [ 0 ] , ch [ 2 ] ) target_heel_offset = a - h ca = ch + target_heel_offset constraint = MotionGroundingConstraint ( frame_idx , ankle_joint_name , ca , None , None ) constraint . heel_position = ch return constraint
short_docstring: create constraint on the ankle position without an orientation constraint
short_docstring_tokens: create constraint on the ankle position without an orientation constraint
comment: """ create constraint on the ankle position without an orientation constraint"""$SEP$#print "add ankle constraint from heel"$SEP$# set heel constraint on the ground$SEP$# difference between unmodified heel and ankle$SEP$# move ankle so heel is on the ground$SEP$#print "set ankle constraint single", ch, ca, target_heel_offset