MATLAB EXPO 2019 MATLAB和Simulink用于开发自动驾驶的新特性
创建虚拟驾驶场景
- Sensor Fusion using synthetic radar and vision data:
- 模拟道路和车辆
- 添加基于统计概率的视觉与雷达传感器
- 测试传感器融合与目标跟踪
- 可视化传感器覆盖区域, 检测列表, 目标跟踪列表
图形化的驾驶场景设计器:
- Driving Scenario Designer: https://www.mathworks.com/help/driving/ref/drivingscenariodesigner-app.html
- 创建道路与车道线标记
- 添加车辆与行驶轨迹
- 设置车辆尺寸与雷达截面积(RCS)
- 提供预定义的ADAS场景
- 支持导入OpenDRIVE格式路网文件
Simulink仿真驾驶场景:
- Test Open-Loop ADAS Algorithm Using Driving Scenario: https://www.mathworks.com/help/driving/ug/test-open-loop-adas-algorithm-using-driving-scenario.html
- 编辑驾驶场景
- 在Simulink中读取场景
- 添加传感器模型
- 可视化传感器输出
- 调节仿真速度
设计车辆的横向与纵向控制
- Lane following control with sensor fusion: https://www.mathworks.com/help/mpc/ug/lane-following-control-with-sensor-fusion-and-lane-detection.html
- 将场景集成到Simulink
- 设计横向(车道保持)与纵向
(间距管理)模型预测控制器 - 设计传感器融合
- 生成C/C++代码
- 软件在环 (SIL) 测试
- 可视化传感器检测列表与目标跟踪列表
控制算法的自动化测试:
- Testing a Lane-Following Controller with Simulink Test: https://www.mathworks.com/help/sltest/examples/testing-a-lane-following-controller.html
- 指定测试需求与被测模型
- 指定测试通过判据
- 测试结果绘图与报告生成
- 自动化整个测试过程
从录制的实车数据生成驾驶场景:
- Scenario Generation from Recorded Vehicle Data: https://www.mathworks.com/help/driving/examples/scenario-generation-from-recorded-vehicle-data.html
- 回放录制的视频
- 导入OpenDRIVE路网
- 导入GPS数据(本车位置)
- 导入传感器目标列表(其他车辆
位置)
车道跟随控制器与视觉算法的集成仿真
- Lane-Following Control with Monocular Camera Perception: https://www.mathworks.com/help/mpc/ug/lane-following-control-with-monocular-camera-perception.html
- 集成Simulink控制器模块
- 车道跟随
- 间距控制
- 集成MATLAB图像算法
- 车道边界检测
- 车辆检测
- 通过“虚幻”引擎合成理想视觉传感器图像
传感器融合与目标跟踪
感知
- 多目标跟踪器(Multi-object tracker)
- GNN跟踪器(Global Nearest Neighbor tracker)
- JPDA跟踪器(Joint Probabilistic Data Association tracker)
- TOMHT跟踪器(Track-Oriented Multi-Hypothesis Tracker)
- PHD跟踪器(Probability Hypothesis Density tracker)
- 跟踪滤波器:
- 线性, 扩展, 无迹卡尔曼滤波器
- 粒子滤波器
- 高斯和滤波器
- 交互式多模型(IMM)滤波器
点目标跟踪与扩展目标跟踪:
- Extended Object Tracking: https://www.mathworks.com/help/fusion/examples/extended-object-tracking.html
- 自定义的扩展目标跟踪器
- 利用高精度传感器对单个目标生成的多个检测
- 可获取更多目标属性:大小、形状、方向等
- 评估跟踪性能和误差指标
- 评估算法在桌面的执行时间
- 点目标跟踪
- 点目标跟踪器 multiObjectTracker
- 传感器对单个目标生成单个检测或经过聚类后形成单个检测
- 将目标简化为一个点进行跟踪
将激光雷达点云转换为目标列表:
- Track Vehicles Using Lidar: https://www.mathworks.com/help/vision/ug/track-vehicles-using-lidar.html
- 设计3-D边框检测器
- 设计目标跟踪器
- 生成C/C++代码
规划
连接HERE高精度实时地图:读取道路和限速属性:
- Use HERE HD Live Map Data to Verify Lane Configurations: https://www.mathworks.com/help/driving/examples/use-here-hd-live-map-data-to-verify-lane-configurations.html
- 载入摄像机与GPS数据
- 读取道路限速
- 读取车道配置
- 可视化组合数据
设计路径规划器:
- Automated Parking Valet: https://www.mathworks.com/help/driving/examples/automated-parking-valet.html
- 创建环境的代价地图
- 膨胀代价地图用于碰撞检测
- 指定目标位置
- 使用快速搜索随机树 (RRT*)算法规划路径
设计路径规划器与车辆控制器:
- Automated Parking Valet in Simulink: https://www.mathworks.com/help/driving/examples/automated-parking-valet-in-simulink.html
- 路径规划器(RRT*算法)
- 车辆横向与纵向控制器(基于运动学的Stanley算法)
- 与车辆动力学模型结合进行闭环仿真
规划与控制算法生成C/C++代码:
- https://www.mathworks.com/help/driving/examples/code-generation-for-path-planning-and-vehicle-control.html
- 独立的模型文件
- 配置代码生成选项
- 生成C/C++代码
- 软件在环 (SIL) 测试
- 评估代码执行时间
控制
通过闭环仿真设计实际的ADAS功能
- Autonomous Emergency Braking with Sensor Fusion: https://www.mathworks.com/help/driving/examples/autonomous-emergency-braking-with-sensor-fusion.html
- 指定驾驶场景
- 设计AEB逻辑
- 设计传感器融合算法
- 仿真完整系统
- 生成C/C++代码
- 软件在环 (SIL) 测试
训练用于ADAS控制的增强学习网络:
- Train DDPG Agent for Adaptive Cruise Control:https://www.mathworks.com/help/reinforcement-learning/ug/train-ddpg-agent-for-adaptive-cruise-control.html
- 创建环境接口
- 创建agent
- 训练agent
- 仿真训练的agent
集成其他资源
- 与ROS集成的三种方式:
- 回放通过ROS记录的数据:Work with rosbag Logfiles https://www.mathworks.com/help/robotics/examples/work-with-rosbag-logfiles.html
- 实时连接ROS系统:Exchange Data with ROS Publishers and Subscribers https://www.mathworks.com/help/robotics/examples/exchange-data-with-ros-publishers.html
- 生成独立的ROS节点:Generate a Standalone ROS Node from Simulink https://www.mathworks.com/help/robotics/examples/generate-a-standalone-ros-node-in-simulink.html
- 从MATLAB调用C++, Python, OpenCV:
- Import C++ Library Functionality into MATLAB: https://www.mathworks.com/help/matlab/matlab_external/what-you-need-to-import-cpp-library-functions-into-matlab.html
- Call Python from MATLAB: https://www.mathworks.com/help/matlab/matlab_external/call-python-from-matlab.html
- Install and Use Computer Vision Toolbox OpenCV Interface: https://www.mathworks.com/help/vision/ug/opencv-interface.html
用到的toolbox:
Model Predictive Control Toolbox
Automated Driving Toolbox
Embedded Coder
Sensor Fusion and Tracking Toolbox
Reinforcement Learning Toolbox