SPRACC6 November   2020 TDA3LA , TDA3LX , TDA3MA , TDA3MD , TDA3MV

 

  1.   Trademarks
  2. 1Ackermann Steering Curve Generation and Drawing Algorithm
  3. 2DSP Link Generation and Integration With Vision_SDK
  4. 3Loading
  5. 4Function Inputs
  6. 5References

DSP Link Generation and Integration With Vision_SDK

The Vision-SDK, from TI, contains a use-case generation tool which simplifies development by letting the developer quickly specify which algorithms run on which core, and in what order. Using the use-case generation tool, a new link was added to an existing use-case that displays 3D surround view and the rearview camera. The algorithm described in the previous section was implemented on the C66x DSP in the Alg_drawRearview link. Figure 2-1 shows the use-case flow chart generated from the output of the use-case generation tool. Additional documentation on the link and chain structures and use-case generation tool is in vision_sdk/docs.

The AlgorithmLink_drawRearviewCreate function is called when the use-case is instantiated. The necessary link parameters for the links and chains framework are generated with this function. This includes allocating the memory and initializing the input and output queues, setting up the output color format, the required buffer information for the draw2D API, and the data structures used within the algorithm link.

Next, the link architecture invokes the AlgorithmLink_drawRearviewProcess function using a notification generated by the previous link, indicating that the input queue is ready to be processed. The use-case architecture requires the rearview lines to be drawn at the same frame rate that is output to the display. However, the current implementation of the Alg_drawRearview link calculates the discrete points on the rearview curves at a rate of 15 frames per second (FPS) and stores them in a buffer that is drawn at a rate of 30 FPS.

GUID-067411C3-E962-4B7F-82AF-C8981365BB0A-low.pngFigure 2-1 Dynamic Rearview Lines + 3D Surround View Use-Case Links and Chains Flow Chart

The Alg_drawRearview function leverages the draw2D API to draw the rearview lines on the video frame. This occurs within the AlgorithmLink_drawAckermannSteering function, where the discrete points of the rearview lines are calculated and drawn, based on the steering direction and inner wheel steering angle. The function stores the coordinate pairs of each discrete point in a set of buffers, and then calls the Draw2D_drawLine function to draw a line segment between two adjacent points. Draw2D_drawLine has a line parameter struct input that lets the developer set the color format, color, and thickness (in pixels) of the lines drawn.

Currently, the dynamic rearview lines demo in the Vision-SDK is a proof of concept that uses a switch statement to update the steering angle and steering direction each time the AlgorithmLink_drawRearviewProcess function is invoked. In an application where a steering wheel is available, the developer could implement a CAN BUS monitor link and a data sync link that could aggregate the steering wheel input data with the video frame that has the same timestamp into the input queue of the Alg_drawRearview link. The data could then be parsed in the AlgorithmLink_drawRearviewProcess function and the AlgorithmLink_drawAckermannSteering function could be called to generate and draw the rearview lines.