'SamplesPerFrame' property does not work in kinematicTrajectory function?

7 ビュー (過去 30 日間)
Xiaohui Wang
Xiaohui Wang 2020 年 9 月 16 日
コメント済み: Xiaohui Wang 2020 年 9 月 27 日
Hi,
I am using Matlab R2019b sensor fusion and tracking toolbox, and got the following warning when I set up the 'SamplePerFrame' property of kinematicTrajectory
> trajectory = kinematicTrajectory('SampleRate', 20, 'SamplesPerFrame', 100)
Warning: The SamplesPerFrame property is not relevant in this configuration of the System object.
> In matlab.system.SystemProp/setProperties
In kinematicTrajectory (line 253)
When I run the following command:
>> bodyAcceleration = [5,5,0]; bodyAngularVelocity = [0,0,1];
>> [position,orientation,velocity,acceleration,angularVelocity] = trajectory(bodyAcceleration,bodyAngularVelocity)
I expected the size of position is 100*3, however I only got a single output, is that related to the warning above?
Thank a lot!

回答 (1 件)

Sai Sri Pathuri
Sai Sri Pathuri 2020 年 9 月 22 日
If you use 'SamplesPerFrame' property with kinematictrajectory system object, you need to set 'AccelerationSource' and 'AngularVelocitySource' to 'Property'.
trajectory = kinematicTrajectory('SampleRate', 20, 'SamplesPerFrame', 100, 'AccelerationSource', 'Property', 'AngularVelocitySource', 'Property');
Here is the link to documentation mentioning this dependency in SamplesPerFrame property section: https://in.mathworks.com/help/nav/ref/kinematictrajectory-system-object.html#mw_7550710d-cdce-4092-9ffc-efd20e1ef0d8
Since you have declared AccelerationSource and AngularVelocitySource as properties, you may define them using Acceleration and AngularVelocity properties respectively and then use system object as below.
trajectory = kinematicTrajectory('SampleRate', 20, 'SamplesPerFrame', 100, ....
'AccelerationSource', 'Property', 'AngularVelocitySource', 'Property',...
'Acceleration', [5,5,0], 'AngularVelocity', [0,0,1]);
[position,orientation,velocity,acceleration,angularVelocity] = trajectory();

カテゴリ

Help Center および File ExchangeAntennas, Microphones, and Sonar Transducers についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by