original_docstring:  the interpolation range must start at end_frame-1 because this is the last modified frame 
docstring: the interpolation range must start at end_frame-1 because this is the last modified frame
docstring_tokens: the interpolation range must start at end_frame - 1 because this is the last modified frame
code: def generate_from_graph_walk(self, motion_vector):
          """ the interpolation range must start at end_frame-1 because this is the last modified frame """
          self.position_constraint_buffer = dict()
          self.orientation_constraint_buffer = dict()
  
          constraints = dict()
          for frame_idx in range(motion_vector.n_frames):
              self.position_constraint_buffer[frame_idx] = dict()
              self.orientation_constraint_buffer[frame_idx] = dict()
              constraints[frame_idx] = []
  
          ground_contacts = collections.OrderedDict()
          blend_ranges = dict()
          blend_ranges[self.right_foot] = []
          blend_ranges[self.left_foot] = []
          graph_walk = motion_vector.graph_walk
          for idx, step in enumerate(graph_walk.steps):
              step_length = step.end_frame - step.start_frame
              if step_length <= 0:
                  print("small frame range ", idx, step.node_key, step.start_frame, step.end_frame)
  
                  continue
              if step.node_key[0] in LOCOMOTION_ACTIONS:
                  step_plant_range = get_plant_frame_range_using_search(self.skeleton, motion_vector, step, self.foot_definitions,
                                                                             self.foot_lift_search_window, self.foot_lift_tolerance)
                  leg_state_model = create_leg_state_model(step_plant_range, step.start_frame, step.end_frame, self.foot_definitions)
                  step_ground_contacts = convert_plant_range_to_ground_contacts(step.start_frame, step.end_frame, step_plant_range)
                  ground_contacts.update(step_ground_contacts)
                  for frame_idx, joint_names in list(step_ground_contacts.items()):
                      constraints[frame_idx] = self.generate_grounding_constraints(motion_vector.frames, frame_idx,
                                                                                  joint_names)
  
          self.set_smoothing_constraints(motion_vector.frames, constraints)
  
          n_frames = len(motion_vector.frames)
          blend_ranges = self.generate_blend_ranges(constraints, n_frames)
  
          return constraints, blend_ranges, ground_contacts
code_tokens: def generate_from_graph_walk ( self , motion_vector ) : self . position_constraint_buffer = dict ( ) self . orientation_constraint_buffer = dict ( ) constraints = dict ( ) for frame_idx in range ( motion_vector . n_frames ) : self . position_constraint_buffer [ frame_idx ] = dict ( ) self . orientation_constraint_buffer [ frame_idx ] = dict ( ) constraints [ frame_idx ] = [ ] ground_contacts = collections . OrderedDict ( ) blend_ranges = dict ( ) blend_ranges [ self . right_foot ] = [ ] blend_ranges [ self . left_foot ] = [ ] graph_walk = motion_vector . graph_walk for idx , step in enumerate ( graph_walk . steps ) : step_length = step . end_frame - step . start_frame if step_length <= 0 : print ( "small frame range " , idx , step . node_key , step . start_frame , step . end_frame ) continue if step . node_key [ 0 ] in LOCOMOTION_ACTIONS : step_plant_range = get_plant_frame_range_using_search ( self . skeleton , motion_vector , step , self . foot_definitions , self . foot_lift_search_window , self . foot_lift_tolerance ) leg_state_model = create_leg_state_model ( step_plant_range , step . start_frame , step . end_frame , self . foot_definitions ) step_ground_contacts = convert_plant_range_to_ground_contacts ( step . start_frame , step . end_frame , step_plant_range ) ground_contacts . update ( step_ground_contacts ) for frame_idx , joint_names in list ( step_ground_contacts . items ( ) ) : constraints [ frame_idx ] = self . generate_grounding_constraints ( motion_vector . frames , frame_idx , joint_names ) self . set_smoothing_constraints ( motion_vector . frames , constraints ) n_frames = len ( motion_vector . frames ) blend_ranges = self . generate_blend_ranges ( constraints , n_frames ) return constraints , blend_ranges , ground_contacts
short_docstring: the interpolation range must start at end_frame-1 because this is the last modified frame
short_docstring_tokens: the interpolation range must start at end_frame - 1 because this is the last modified frame
comment: """ the interpolation range must start at end_frame-1 because this is the last modified frame """