主要内容

plotPointCloud

在鸟瞰图上显示生成的点云

描述

例子

plotPointCloud (pcPlotterpcObject显示由点云数据对象生成的点云,pcObject.点云绘图仪,pcPlotter,与a有关birdsEyePlot对象,并配置指定点云的显示。

要删除与点云绘图仪关联的点云,请使用clearData函数与pcPlotter指定为输入参数。

plotPointCloud (pcPlotterpointCloudMatrix指定点云数据为二维或三维点的矩阵,pointCloudMatrix

例子

全部折叠

的方法生成具有多个参与者的驾驶场景的激光雷达点云数据lidarPointCloudGenerator系统对象。使用drivingScenario对象。它包括一个自我的车辆,行人和其他两辆车。

创建并绘制一个有多辆车的驾驶场景

创建一个驾驶场景。

场景= drivingScenario;

在驾驶场景中添加一条直路。这条路的每个方向都有一条车道。

道路中心= [0 0;70 0 0];lanspec = lanespec([1 1]);路(场景、roadCenters“道”, laneSpecification);

在驾驶场景中添加一辆自我汽车。

egoVehicle =车辆(场景中,“ClassID”,1,“网”, driving.scenario.carMesh);路径点= [1 -2 0;35 2 0];smoothTrajectory (egoVehicle锚点10);

在驾驶场景中添加卡车、行人和自行车,并绘制场景。

卡车=车辆(场景中,“ClassID”2,“长度”, 8.2,“宽度”, 2.5,“高度”, 3.5,...“网”, driving.scenario.truckMesh);路径点= [70 1.7 0;20 1.9 0];smoothTrajectory(卡车,锚点,15);行人=演员(场景中,“ClassID”4“长度”, 0.24,“宽度”, 0.45,“高度”, 1.7,...“网”, driving.scenario.pedestrianMesh);路径点= [23 -4 0;10.4 - 4 0);smoothTrajectory(行人,锚点,1.5);自行车=演员(场景中,“ClassID”,3,“长度”, 1.7,“宽度”, 0.45,“高度”, 1.7,...“网”, driving.scenario.bicycleMesh);路径点= [12.7 -3.3 0;49.3 - -3.3 0);smoothTrajectory(自行车、锚点、5);情节(场景中,“网格”“上”

图中包含一个轴对象。axis对象包含7个类型为patch, line的对象。

生成和绘制激光雷达点云数据

创建一个lidarPointCloudGenerator系统对象。

激光雷达= lidarPointCloudGenerator;

将参与者概要文件和ego车辆参与者ID从驾驶场景添加到System对象。

激光雷达。ActorProfiles = ActorProfiles(场景);激光雷达。EgoVehicleActorID = egoVehicle.ActorID;

绘制点云数据。

cep = birdsEyePlot (“Xlimits”70年[0],“YLimits”[-30] 30日);绘图机= pointCloudPlotter (cep);传奇(“关闭”);advance(scenario) tgts = targetpose (egoVehicle);rdmesh = roadMesh (egoVehicle);[ptCloud, isValidTime] =激光雷达(tgt, rdmesh scenario.SimulationTime);如果isValidTime plotPointCloud(绘图仪,ptCloud);结束结束

图中包含一个轴对象。axis对象包含7个类型为patch, line的对象。

图中包含一个轴对象。axis对象是空的。

输入参数

全部折叠

点云绘图器,指定为pointCloudPlotter对象。对象存储在策划者财产的birdsEyePlot对象,并配置鸟眼图中指定点云的显示。属性的名称对应于名称-值对参数pointCloudPlotter函数。

点云数据对象,指定为pointCloud对象。

点云数据矩阵,指定为N2或N3实值矩阵。矩阵第一列中的每个元素对应于x -点云中某一点的坐标。第二列和第三列中的元素对应于y -z -坐标。

数据类型:|

介绍了R2020a