资源简介
自动驾驶感知软件中,使用卡尔曼滤波和匈牙利算法实现的matlab多目标融合的一个例子。里面使用了相机和毫米波雷达的数据来进行融合
代码片段和文件信息
function [allData scenario sensor] = generateSensorData()
%generateSensorData - Returns sensor detections
% allData = generateSensorData returns sensor detections in a structure
% with time for an internally defined scenario and sensor suite.
%
% [allData scenario sensors] = generateSensorData optionally returns
% the drivingScenario and detection generator objects.
% Generated by MATLAB(R) 9.5 and Automated Driving System Toolbox 1.3.
% Generated on: 07-Mar-2019 23:15:02
% Create the drivingScenario object and ego car
[scenario egoCar] = createDrivingScenario;
% Create all the sensors
sensor = createSensor(scenario);
allData = struct(‘Time‘ {} ‘ActorPoses‘ {} ‘objectDetections‘ {} ‘LaneDetections‘ {});
running = true;
while running
% Generate the target poses of all actors relative to the ego car
poses = targetPoses(egoCar);
time = scenario.SimulationTime;
% Generate detections for the sensor
laneDetections = [];
[objectDetections numobjects isValidTime] = sensor(poses time);
objectDetections = objectDetections(1:numobjects);
% Aggregate all detections into a structure for later use
if isValidTime
allData(end + 1) = struct( ...
‘Time‘ scenario.SimulationTime ...
‘ActorPoses‘ actorPoses(scenario) ...
‘objectDetections‘ {objectDetections} ...
‘LaneDetections‘ {laneDetections}); %#ok
end
% Advance the scenario one time step and exit the loop if the scenario is complete
running = advance(scenario);
end
% Restart the driving scenario to return the actors to their initial positions.
restart(scenario);
% Release the sensor object so it can be used again.
release(sensor);
%%%%%%%%%%%%%%%%%%%%
% Helper functions %
%%%%%%%%%%%%%%%%%%%%
% Units used in createSensors and createDrivingScenario
% Distance/Position - meters
% Speed - meters/second
% Angles - degrees
% RCS Pattern - dBsm
function sensor = createSensor(scenario)
% createSensors Returns all sensor objects to generate detections
% Assign into each sensor the physical and radar profiles for all actors
profiles = actorProfiles(scenario);
sensor = visionDetectionGenerator(‘SensorIndex‘ 1 ...
‘SensorLocation‘ [3.7 0] ...
‘MaxRange‘ 10 ...
‘DetectorOutput‘ ‘objects only‘ ...
‘Intrinsics‘ cameraIntrinsics([1814.81018227767 1814.81018227767][320 240][480 640]) ...
‘ActorProfiles‘ profiles);
function [scenario egoCar] = createDrivingScenario
% createDrivingScenario Returns the drivingScenario defined in the Designer
% Construct a drivingScenario object.
scenario = drivingScenario;
% Add all road segments
roadCenters = [72.2 7.1 0;
22.3 11.7 0;
-1.2 36.2 0];
laneSpecification = lanespec(2 ‘Width‘ 2.925);
road(scenario roadCenters ‘Lanes‘ laneSpecification);
% Add t
- 上一篇:使用QQ监控Matlab程序运行
- 下一篇:PIIFD描述符matlab源代码
相关资源
- PIIFD描述符matlab源代码
- 使用QQ监控Matlab程序运行
- 登月挺软着陆MATLAB仿真
- 图像分割的多种算法MATLAB代码
- matlab实现图像模板匹配
- 光伏MPPT模型
- RS编码和纠错算法 matlab
- Matlab2010b的license.txt
- 基于matlab的自动报靶系统.rar
- matlab声线图源代码
- 神经网络理论与Matlab R2007实现
-
matlab simuli
nk 离合器模型 - 多车型车辆路径问题Matlab程序
- GPS/INS组合导航Matlab仿真源码包含实验
- Delaunay三角划分的Matlab实现
- isight联合matlab仿真
- 利用MATLAB优化电力系统稳定器
- BPA转matpower格式Matlab程序
- 基于C MEX S函数的研华PCI1716驱动程序
- 最小二乘法 MATLAB
- aodv和dsr的matlab实现
- 回溯法解决资源约束下的二维动态规
- rgb2lab颜色空间转换的MATLAB代码
- polar程序MATLAB编译码
- matlab基于SAD的区域立体匹配方法
- 灰度高度图
- Matlab实现文本文件读取并存储成矩阵
- LS信道估计算法仿真代码
- 基于HMM的语音识别系统的matlab仿真
- Matlab与蒙特卡洛仿真
评论
共有 条评论