How extract coordinate x,y from LidarSALM object

1 回表示 (過去 30 日間)
Michal Mihálik
Michal Mihálik 2021 年 9 月 6 日
回答済み: Shantanu Dixit 2024 年 11 月 26 日
how do I extract x, y coordinates from LidarSLAM object into array? if I use [scansSLAM, poses] = scansAndPoses (objectSlam); so I only get the data I previously added to with addscan. Is there such a function or is it necessary to write it down?

回答 (1 件)

Shantanu Dixit
Shantanu Dixit 2024 年 11 月 26 日
Hi Michal,
As of MATLAB R2024b, there doesn't seem to be a built in function to directly access the 'x' and 'y' coordinates from the 'lidarSLAM' object. For accessing the information you can extract the x and y coordinates from a 'lidarSLAM' object using 'scansAndPoses' and store them in an array directly.
[~, poses] = scansAndPoses(objectSlam); % assuming objectSlam is the lidarSLAM object
% poses matrix is nX3 matrix of [x y theta] vectors
xCoordinates = poses(:,1)
yCoordinates = poses(:,2)
theta = poses(:,3)
Hope this helps!

カテゴリ

Help Center および File ExchangeSLAM についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by