-
Notifications
You must be signed in to change notification settings - Fork 68
/
getNrOfDegreesOfFreedom.m
37 lines (29 loc) · 1.11 KB
/
getNrOfDegreesOfFreedom.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
function nDof = getNrOfDegreesOfFreedom(KinDynModel)
% GETNROFDEGREESOFFREEDOM gets the dimension of the joint space.
%
% This matlab function wraps a functionality of the iDyntree library.
% For further info see also: https://github.com/robotology/idyntree
%
% FORMAT: nDof = getNrOfDegreesOfFreedom(KinDynModel)
%
% INPUTS: - KinDynModel: a structure containing the loaded model and additional info.
%
% OUTPUTS: - nDof: number of DoFs of the system.
%
% Author : Gabriele Nava ([email protected])
%
% SPDX-FileCopyrightText: Fondazione Istituto Italiano di Tecnologia (IIT)
% SPDX-License-Identifier: BSD-3-Clause
%% ------------Initialization----------------
% get the number of DoF
nDof = KinDynModel.kinDynComp.getNrOfDegreesOfFreedom();
% Debug output
if KinDynModel.DEBUG
disp('[getNrOfDegreesOfFreedom]: debugging outputs...')
% check nDof is not empty
if isempty(nDof)
warning('[getNrOfDegreesOfFreedom]: nDof is empty.')
end
disp('[getNrOfDegreesOfFreedom]: done.')
end
end