필터 지우기
필터 지우기

Changing the ego view axes

조회 수: 2 (최근 30일)
Mohamed soliman
Mohamed soliman 2020년 12월 10일
답변: Pratheek Punchathody 2021년 1월 20일
Hello ,
I am trying to use the Collsion warning using 2-D lidar example but the Ego view axes are rotated.
How can I change it so that the lidar view matches obstcales i n the map.
Thanks

답변 (1개)

Pratheek Punchathody
Pratheek Punchathody 2021년 1월 20일
As per my understanding you want to rotate the axes to match obstacles in the map.
Rotating the axes can be performed by using the function camroll(). Refer to the documentation on camroll for further information.
%This code is the part of the CollisionWarningUsing2DLidarExample>Simulate 2-D Lidar Sensor section
scan = lidarScan(ranges, angles);
plot(scan)
title('Ego View')
helperPlotRobot(gca, [0 0 Vehiclepose(3)]);
camroll(-90); %Rotates the camera around the camera viewing axis by the amounts specified
For the above code from the example below is the output which is mentioned.
Alternatively, you can use the following command with the example code as shown below
%This code is the part of the CollisionWarningUsing2DLidarExample>Simulate 2-D Lidar Sensor section
scan = lidarScan(ranges, angles);
plot(scan)
title('Ego View')
helperPlotRobot(gca, [0 0 Vehiclepose(3)]);
set(gca,'XDir','reverse');
Output of the ego view for the above code is shown below
Making a combination of both “camroll()” and “set()” function will help in matching the ego view with the obstacles in the map.

카테고리

Help CenterFile Exchange에서 Labeling, Segmentation, and Detection에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by