parameters: (self, data)
docstring: New Planning Trajectory
docstring_summary: New Planning Trajectory
docstring_tokens: New Planning Trajectory
function: def callback_planning(self, data):
          """New Planning Trajectory"""
          if self.stgraph:
              st_s, st_t, polygons_s, polygons_t = proto_utils.flatten(
                  data.debug.planning_data.st_graph,
                  ['speed_profile.s',
                   'speed_profile.t',
                   'boundary.point.s',
                   'boundary.point.t'])
  
              with self.lock:
                  for i in range(len(st_s)):
                      self.ax[i].new_planning(st_t[i], st_s[i],
                                              polygons_t[i], polygons_s[i])
  
          else:
              if len(data.trajectory_point) == 0:
                  print(data)
                  return
  
              x, y, speed, theta, kappa, acc, relative_time = np.array(
                  proto_utils.flatten(data.trajectory_point,
                                      ['path_point.x',
                                       'path_point.y',
                                       'v',
                                       'path_point.theta',
                                       'path_point.kappa',
                                       'a',
                                       'relative_time']))
              relative_time += data.header.timestamp_sec
  
              with self.lock:
                  self.ax[0].new_planning(relative_time, x, y)
                  self.ax[1].new_planning(relative_time, speed)
  
                  if self.ax[2].title == "Curvature":
                      self.ax[2].new_planning(relative_time, kappa)
  
                  if self.ax[3].title == "Heading":
                      self.ax[3].new_planning(relative_time, theta)
                  else:
                      self.ax[3].new_planning(relative_time, acc)
function_tokens: def callback_planning ( self , data ) : if self . stgraph : st_s , st_t , polygons_s , polygons_t = proto_utils . flatten ( data . debug . planning_data . st_graph , [ 'speed_profile.s' , 'speed_profile.t' , 'boundary.point.s' , 'boundary.point.t' ] ) with self . lock : for i in range ( len ( st_s ) ) : self . ax [ i ] . new_planning ( st_t [ i ] , st_s [ i ] , polygons_t [ i ] , polygons_s [ i ] ) else : if len ( data . trajectory_point ) == 0 : print ( data ) return x , y , speed , theta , kappa , acc , relative_time = np . array ( proto_utils . flatten ( data . trajectory_point , [ 'path_point.x' , 'path_point.y' , 'v' , 'path_point.theta' , 'path_point.kappa' , 'a' , 'relative_time' ] ) ) relative_time += data . header . timestamp_sec with self . lock : self . ax [ 0 ] . new_planning ( relative_time , x , y ) self . ax [ 1 ] . new_planning ( relative_time , speed ) if self . ax [ 2 ] . title == "Curvature" : self . ax [ 2 ] . new_planning ( relative_time , kappa ) if self . ax [ 3 ] . title == "Heading" : self . ax [ 3 ] . new_planning ( relative_time , theta ) else : self . ax [ 3 ] . new_planning ( relative_time , acc )