I want to define my custom state space in matlab for my robot,i followed this tutorial ,https://in.mathworks.com/help/nav/ref/nav.statespace-class.html
3 ビュー (過去 30 日間)
古いコメントを表示
In this as soon as i include this line
matlabshared.planning.internal.EnforceScalarHandle
it starts throwing error like illegal use of classdef ,kindly tell whats the solution to this problem
0 件のコメント
回答 (1 件)
Cameron Stabile
2021 年 12 月 7 日
編集済み: Cameron Stabile
2021 年 12 月 7 日
Hi Mukund,
Without any reproduction code it is hard to determine the problem. If you have not done so already, my suggestion would be to call createPlanningTemplate from your command line:
>> createPlanningTemplate()
This should create a new file which contains the definition to a generic state-space class named "MyCustomStateSpace". Save this file under the same name (i.e. MyCustomStateSpace.m) and you should be able to create an instance of the newly defined state-space:
ss = MyCustomStateSpace
If this works, then you should be able to edit the newly saved state-space to suit your needs, and note that you can also generate a default state-validator using the same template:
createPlanningTemplate('StateValidator')
Please let us know if this resolves the issue.
Best,
Cameron
2 件のコメント
Cameron Stabile
2021 年 12 月 16 日
Hi Mukund,
It's unclear whether your last post was a self-answer to your original question, or additional information. Did commenting out the line resolve the problem for you?
One thing to note - if your original file looked like the following:
classdef MyCustomStateSpace < nav.StateSpace
matlabshared.planning.internal.EnforceScalarHandle
properties
UniformDistribution
...
Then you would likely have needed "& ..." at the end of the first line to continue inheriting from additional classes:
classdef MyCustomStateSpace < nav.StateSpace & ...
matlabshared.planning.internal.EnforceScalarHandle
properties
UniformDistribution
...
If the issue has been resolved, please mark this question as "Answered", otherwise let us know if you are encountering further problems.
Best,
Cameron
参考
カテゴリ
Help Center および File Exchange で Motion Planning についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!