-
Notifications
You must be signed in to change notification settings - Fork 68
/
getFrameVelocityRepresentation.m
51 lines (40 loc) · 1.51 KB
/
getFrameVelocityRepresentation.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
function frameVelRepr = getFrameVelocityRepresentation(KinDynModel)
% GETFRAMEVELOCITYREPRESENTATION retrieves the current frame velocity
% representation.
%
% This matlab function wraps a functionality of the iDyntree library.
% For further info see also: https://github.com/robotology/idyntree
%
% FORMAT: frameVelRepr = getFrameVelocityRepresentation(KinDynModel)
%
% INPUTS: - KinDynModel: a structure containing the loaded model and additional info.
%
% OUTPUTS: - frameVelRepr: a string with one of the following possible values:
% 'mixed', 'body', 'inertial';
%
% Possible frame velocity representations:
%
% 0 = INERTIAL_FIXED_REPRESENTATION
%
% 1 = BODY_FIXED_REPRESENTATION
%
% 2 = MIXED_REPRESENTATION
%
% Author : Gabriele Nava ([email protected])
%
% SPDX-FileCopyrightText: Fondazione Istituto Italiano di Tecnologia (IIT)
% SPDX-License-Identifier: BSD-3-Clause
%% ------------Initialization----------------
frameVelRepr_idyntree = KinDynModel.kinDynComp.getFrameVelocityRepresentation();
% output the current frame velocity representation
switch frameVelRepr_idyntree
case 2
frameVelRepr = 'mixed';
case 1
frameVelRepr = 'body';
case 0
frameVelRepr = 'inertial';
otherwise
error('[setFrameVelocityRepresentation]: frameVelRepr is not a valid string.')
end
end