exampleHel​perDiffDri​veCtrl gives weird error

5 ビュー (過去 30 日間)
Karim ElShorbagi
Karim ElShorbagi 2021 年 4 月 20 日
回答済み: Remo Pillat 2021 年 8 月 20 日
So I'm trying to recreate the mapping with known poses example but with my own binary occupancy map, and when I get to the final step where I use the 'exampleHelperDiffDriveCtrl' function I get the following error:
'exampleHelperDiffDriveCtrl' is used in Mapping with Known Poses.
Error in assignment (line 59)
exampleHelperDiffDriveCtrl(diffDrive,controller,initPose,goal,refmap,map,reffigure,mapfigure,sensor)
I don't really understand what's causing this. Any help?
  1 件のコメント
Amrtanshu Raj
Amrtanshu Raj 2021 年 4 月 23 日
Hi,
Can you attach the code you wrote, since that will help us reproduce the error on our end ?

サインインしてコメントする。

回答 (1 件)

Remo Pillat
Remo Pillat 2021 年 8 月 20 日
Hi Karim,
The exampleHelperDiffDriveCtrl function is only on the MATLAB path when the "Mapping with Known Poses" example is loaded. To add this function to the MATLAB path, you could call
addpath(fullfile(matlabroot, "examples", "robotics", "main"))
This will make this example helper (along with others) available in your current MATLAB session. If you want the MATLAB path to be persistent across multiple MATLAB sessions, you can save your current path settings with:
savepath
Hope this resolves your issue.

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by