Robot Mapping and Navigation in MATLAB
11 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to create 'robot mapping with known poses' algorithm using lidar sensor.
For reference I am following the code given on this link: https://in.mathworks.com/help/robotics/examples/mapping-with-known-poses.html
Under the section: Update map by taking sensor measurements, is where the lidar part comes in. As I am currently not aware of how to use the lidar function to scan the map, can someone guide me with this?
Huge thanks for taking time to help me with the problem.
0 件のコメント
回答 (3 件)
Joseph
2020 年 3 月 28 日
Hi Jasraj,
You need to clarify your question a bit more.
In the beginning, we can see that sensor was defined:
sensor = rangeSensor;
sensor.Range = [0,10];
and then we called the function exampleHelperDiffDriveCtrl:
exampleHelperDiffDriveCtrl(diffDrive,controller,initPose,goal,refMap,map,refFigure,mapFigure,sensor)
If you look at the function itself, then you can see that the inputs are:
function exampleHelperDiffDriveControl(diffDrive,ppControl,initPose,goal,map1,map2,fig1,fig2,lidar)
so here, essentially rangeSensor/sensor was passed as lidar. And then if you follow along you'll see that:
[ranges, angles] = lidar(position, map1);
scan = lidarScan(ranges,angles);
If you want to learn more then look into what does lidarScan do with the outputs of lidar in the documentation here. Playing with the examples by changing parameters and reading the documentation should serve you well.
0 件のコメント
Chris
2020 年 6 月 9 日
編集済み: Chris
2020 年 6 月 9 日
Hey,
you have to use the lidarScan function to create the input data for the SLAM algorithm.
With start I defined the start value, it's 1. With the steps value I defined the final index of measurement data.
For example if i want to have 230 samples in 1 scan: start=1, steps=230.
Hope the answer is not too late and it still can help you.
if(ii==steps)
scan{1,i}=lidarScan(distancearray(start:steps,1),angleradarray(start:steps,1));
[isScanAccepted, loopClosureInfo, optimizationInfo] = addScan(slamAlg, scan{i});
if ~isScanAccepted
continue;
end
0 件のコメント
kalpesh
2023 年 3 月 29 日
if(ii==steps)
scan{1,i}=lidarScan(distancearray(start:steps,1),angleradarray(start:steps,1));
[isScanAccepted, loopClosureInfo, optimizationInfo] = addScan(slamAlg, scan{i});
if ~isScanAccepted
continue;
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Robotics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!