'SamplesPerFrame' property does not work in kinematicTrajectory function?

14 visualizaciones (últimos 30 días)
Xiaohui Wang
Xiaohui Wang el 16 de Sept. de 2020
Comentada: Xiaohui Wang el 27 de Sept. de 2020
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!

Respuestas (1)

Sai Sri Pathuri
Sai Sri Pathuri el 22 de Sept. de 2020
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();

Categorías

Más información sobre Software Development Tools en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by