inflate
설명
inflate(
는 입력 map3D
,radius
)occupancyMap3D
객체에 지정된 각 점유 위치를 미터 단위로 지정된 radius
범위로 확장합니다. radius
는 맵의 해상도에 따라 가장 가까운 셀에 상응하는 값으로 반올림됩니다. 이 확장은 맵에서 점유된 위치의 크기를 증가시킵니다.
예제
3차원 점유 맵에서 반직선 교차점 구하기
3차원 점유 맵을 가져옵니다.
map3D = importOccupancyMap3D("citymap.ot")
map3D = occupancyMap3D with properties: ProbabilitySaturation: [1.0000e-03 0.9990] Resolution: 1 OccupiedThreshold: 0.6500 FreeThreshold: 0.2000
점유된 영역을 반경 범위 1m만큼 확장합니다. 맵을 표시합니다.
inflate(map3D,1) show(map3D)
점유된 맵 셀과 반직선의 교차점을 찾습니다.
numRays = 10; angles = linspace(-pi/2,pi/2,numRays); directions = [cos(angles); sin(angles); zeros(1,numRays)]'; sensorPose = [55 40 1 1 0 0 0]; maxrange = 15; [intersectionPts,isOccupied] = rayIntersection(map3D,sensorPose,directions,maxrange)
intersectionPts = 10×3
55.0000 32.0000 1.0000
57.9118 32.0000 1.0000
61.7128 32.0000 1.0000
67.9904 32.5000 1.0000
69.0000 37.5314 1.0000
69.0000 42.4686 1.0000
67.9904 47.5000 1.0000
64.6418 51.4907 1.0000
58.2757 49.0000 1.0000
55.0000 49.0000 1.0000
isOccupied = 10×1
1
1
1
-1
1
1
-1
-1
1
1
교차점을 플로팅하고 자세에서 교차점까지의 반직선을 플로팅합니다.
hold on plotTransforms(sensorPose(1:3),sensorPose(4:end),... 'FrameSize',5,'MeshFilePath','groundvehicle.stl') % Vehicle sensor pose for i = 1:numRays plot3([sensorPose(1),intersectionPts(i,1)],... [sensorPose(2),intersectionPts(i,2)],... [sensorPose(3),intersectionPts(i,3)],'-b') % Plot rays if isOccupied(i) == 1 plot3(intersectionPts(i,1),intersectionPts(i,2),intersectionPts(i,3),'*r') % Intersection points end end
입력 인수
map3D
— 3차원 점유 맵
occupancyMap3D
객체
3차원 점유 맵으로, occupancyMap3D
객체로 지정됩니다.
radius
— 점유된 위치를 확장하는 크기
스칼라
점유된 위치를 확장하는 크기로, 스칼라로 지정됩니다. radius
는 가장 가까운 셀 값으로 반올림됩니다.
버전 내역
R2019b에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)