Student Lounge

Sharing technical and real-life examples of how students can use MATLAB and Simulink in their everyday projects #studentsuccess

Deploying Algorithms from MATLAB and Simulink to NVIDIA DRIVE AGX

This is第二邮政of our two-关于Mathworks如何平台的一部分系列s金宝app支持使用NVIDIA的AV开发人员驾驶Sim and deploy algorithms to NVIDIA hardware((请参阅第1部分)。在这篇文章中,我们将介绍如何部署在MATLAB中创建的算法,然后simulink到Nvidia金宝app驾驶AGX

Simulink provides an environment to integrate and run simulations of the control logic with the vehicle dynamics and environment models. This enablest他的整个系统要测试伯爵y在The design process. GPU Coder and Embedded Coder can then be used to deploy to modern NVIDIA GPUs, including theNVIDIA DRIVE platform

To illustrate this workflow, consider a高速公路车道跟随系统That引导车辆在标记的车道内行驶。该系统通常使用视觉处理算法来检测相机的车道和车辆。控制器使用车道检测,车辆检测和设定速度来控制转向和加速度。

可以运行系统级模拟,以查看其正确识别道路上的车道标记和车辆。

视觉探测子系统中的在put video is fed to two deep-learning networks running in parallel to detect the left and right lane markers and oncoming vehicles. Pre- and post-processing subsystems prepare the input video data for the two deep learning networks, annotate the lane markers, and draw bounding boxes around detected vehicles prior to displaying the output video.

使用从测试车辆捕获的视频,可以在主机机器CPU上运行视觉检测器子系统的模拟,以确保其正确识别车道标记和传入车辆。

In this example, running the simulation on the CPU, the framerate appears choppy. Developers can switch to a desktop NVIDIA GPU to speed up the simulation. The output results remain the same and the framerate improves significantly.

When使满意通过模拟结果,开发人员可以生成代码以从同一Simulink模型中定位NVIDIA驱动器。金宝app嵌入式编码器生成在ARM处理器上运行的优化的C/C ++代码,而GPU编码器为CUDA内核生成CUDA内核。GPU编码器照顾在GPU上分配内存(使用cudaMalloc呼叫),移动CPU和GPU内存之间的数据(使用cudaMemcpyToSymbolcalls), and calling the CUDA kernels, all at the appropriate points in the code.

GPU Coder then calls the NVIDIA toolchain to compile and download the complete application on the NVIDIA DRIVE. Using Simulink to start the application on the board, the processed video is sent back from the NVIDIA DRIVE on the SDL video display window. The framerate is not quite as snappy as running the simulation on the desktop GPU, but it is to be expected given the more resource-constrained embedded GPU.

通过设置了此工作流,可以继续调整Simulink模型,并且可以金宝app在几分钟内看到更改在NVIDIA GPU上运行。仿真能够在此过程中较早地查找和修复错误,而GPU编码器和嵌入式编码器为在NVIDIA驱动器上运行整个应用程序提供了自动化工作流程。

To learn more about how to use the different MathWorks platforms for automated driving development,,,,and how other AV developers use MathWorks platforms in their development,,,,register forMATLABExpo在4Thand 5ThMay 2021. The events include talks from other MathWorks usersautomated driving在cluding:

  • Bosch
  • 康明斯
  • General Motors
  • 通量自动
  • Porsche Engineering
  • Renault Nissan
  • 塔西姆普
  • ZF

技术的presentations来自数学工程师自动驾驶包括:

  • MATLAB的新功能,金宝appandRoadrunnerfor Automated Driving
  • 设计和评估自动驾驶的传感器融合算法
  • 开发用于自动驾驶测试的虚拟场景
  • 为高速公路车道变更开发运动计划者Maneuvers
|

댓글

댓글을 남기려면링크를클릭하여하여계정계정하거나계정만드십시오만드십시오만드십시오。