MATLAB 도움말 센터
Mesh representation of pedestrian in driving scenario
pedMesh = driving.scenario.pedestrianMesh
pedMesh = driving.scenario.pedestrianMesh creates a mesh representation of a pedestrian as an extendedObjectMesh object, mesh.
pedMesh
extendedObjectMesh
mesh
example
collapse all
Add the prebuilt pedestrian mesh to a driving scenario. Then, use lidarPointCloudGenerator System object™ to generate a point cloud of the pedestrian mesh.
lidarPointCloudGenerator
Create and show the prebuilt pedestrian mesh.
mesh = driving.scenario.pedestrianMesh; egoMesh = driving.scenario.carMesh; show(mesh);
Create a driving scenario.
s = drivingScenario;
Add a straight road to the driving scenario. The road has one lane in each direction.
road(s,[0 0 0; 30 0 0],'Lanes',lanespec([1 1]));
Add a car as an ego vehicle and a pedestrian as a non-ego actor.
egoVehicle = vehicle(s,'ClassID',1,'Mesh',egoMesh); smoothTrajectory(egoVehicle,[1 -2 0; 21.3 -2 0],20); pedestrian = actor(s,'Length',0.24,'Width',0.45,'Height',1.7,'Position',[15 2 0],'ClassID',4,'Mesh',mesh);
Plot the driving scenario. Set name-value pair 'Meshes','on' to show the meshes of the actors in the plot.
'Meshes','on'
plot(s,'Meshes','on');
Create a lidarPointCloudGenerator System object. Set the actor profiles of the System object to those in the driving scenario.
lidar = lidarPointCloudGenerator; lidar.ActorProfiles = actorProfiles(s);
Generate a lidar point cloud of the driving scenario.
player = pcplayer([-20 20],[-10 10],[0 4]); while advance(s) tgts = targetPoses(egoVehicle); rdmesh = roadMesh(egoVehicle); [ptCloud,isValidTime] = lidar(tgts,rdmesh,s.SimulationTime); if isValidTime view(player,ptCloud); end end
Mesh representation of pedestrian, returned as an extendedObjectMesh object. The origin of the mesh is located at its geometric center.
You can develop your own meshes by using this prebuilt pedestrian mesh as a starting point. At the MATLAB® command line, enter:
edit driving.scenario.pedestrianMesh
Introduced in R2020a
driving.scenario.bicycleMesh
driving.scenario.carMesh
driving.scenario.truckMesh
translate
rotate
scale
applyTransform
join
scaleToFit
show
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의