parameters: (self, wlh_factor: float = 1.0)
return_statement: return corners
docstring: Returns the bounding box corners.
          :param wlh_factor: <float>. Multiply w, l, h by a factor to inflate or deflate the box.
          :return: <np.float: 3, 8>. First four corners are the ones facing forward.
              The last four are the ones facing backwards.
docstring_summary: Returns the bounding box corners.
          :param wlh_factor: <float>. Multiply w, l, h by a factor to inflate or deflate the box.
          :return: <np.float: 3, 8>. First four corners are the ones facing forward.
              The last four are the ones facing backwards.
docstring_tokens: Returns the bounding box corners . : param wlh_factor : <float > . Multiply w l h by a factor to inflate or deflate the box . : return : <np . float : 3 8 > . First four corners are the ones facing forward . The last four are the ones facing backwards .
function: def corners(self, wlh_factor: float = 1.0):
          """
          Returns the bounding box corners.
          :param wlh_factor: <float>. Multiply w, l, h by a factor to inflate or deflate the box.
          :return: <np.float: 3, 8>. First four corners are the ones facing forward.
              The last four are the ones facing backwards.
          """
          w, l, h = self.wlh * wlh_factor
  
          # 3D bounding box corners. (Convention: x points forward, y to the left, z up.)
          x_corners = l / 2 * np.array([1, 1, 1, 1, -1, -1, -1, -1])
          y_corners = w / 2 * np.array([1, -1, -1, 1, 1, -1, -1, 1])
          z_corners = h / 2 * np.array([1, 1, -1, -1, 1, 1, -1, -1])
          corners = np.vstack((x_corners, y_corners, z_corners))
  
          # Rotate
          corners = np.dot(self.orientation.rotation_matrix, corners)
  
          # Translate
          x, y, z = self.center
          corners[0, :] = corners[0, :] + x
          corners[1, :] = corners[1, :] + y
          corners[2, :] = corners[2, :] + z
  
          return corners
function_tokens: def corners ( self , wlh_factor : float = 1.0 ) : w , l , h = self . wlh * wlh_factor # 3D bounding box corners. (Convention: x points forward, y to the left, z up.) x_corners = l / 2 * np . array ( [ 1 , 1 , 1 , 1 , - 1 , - 1 , - 1 , - 1 ] ) y_corners = w / 2 * np . array ( [ 1 , - 1 , - 1 , 1 , 1 , - 1 , - 1 , 1 ] ) z_corners = h / 2 * np . array ( [ 1 , 1 , - 1 , - 1 , 1 , 1 , - 1 , - 1 ] ) corners = np . vstack ( ( x_corners , y_corners , z_corners ) ) # Rotate corners = np . dot ( self . orientation . rotation_matrix , corners ) # Translate x , y , z = self . center corners [ 0 , : ] = corners [ 0 , : ] + x corners [ 1 , : ] = corners [ 1 , : ] + y corners [ 2 , : ] = corners [ 2 , : ] + z return corners