From f73e3391cc24302898080de37c77a3c3d99496ff Mon Sep 17 00:00:00 2001 From: Lorenzo Moretti <107630048+LoreMoretti@users.noreply.github.com> Date: Thu, 16 Nov 2023 23:27:04 +0100 Subject: [PATCH 1/2] Update loadReducedModel.m Use "fullfile" matlab function to concatenate paths --- bindings/matlab/+iDynTreeWrappers/loadReducedModel.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/matlab/+iDynTreeWrappers/loadReducedModel.m b/bindings/matlab/+iDynTreeWrappers/loadReducedModel.m index c21b3c8622d..9a2af0b5951 100644 --- a/bindings/matlab/+iDynTreeWrappers/loadReducedModel.m +++ b/bindings/matlab/+iDynTreeWrappers/loadReducedModel.m @@ -24,7 +24,7 @@ % GNU Lesser General Public License v2.1 or any later version. %% ------------Initialization---------------- - disp(['[loadReducedModel]: loading the following model: ',[modelPath,modelName]]); + disp(['[loadReducedModel]: loading the following model: ',fullfile(modelPath,modelName)]); % if DEBUG option is set to TRUE, all the wrappers will be run in debug % mode. Wrappers concerning iDyntree simulator have their own debugger @@ -45,7 +45,7 @@ modelLoader = iDynTree.ModelLoader(); reducedModel = modelLoader.model(); - modelLoader.loadReducedModelFromFile([modelPath,modelName], jointList_idyntree); + modelLoader.loadReducedModelFromFile(fullfile(modelPath,modelName), jointList_idyntree); % get the number of degrees of freedom of the reduced model KinDynModel.NDOF = reducedModel.getNrOfDOFs(); @@ -59,5 +59,5 @@ % set the floating base link KinDynModel.kinDynComp.setFloatingBase(KinDynModel.BASE_LINK); - disp(['[loadReducedModel]: loaded model: ',[modelPath,modelName],', number of joints: ',num2str(KinDynModel.NDOF)]); + disp(['[loadReducedModel]: loaded model: ',fullfile(modelPath,modelName),', number of joints: ',num2str(KinDynModel.NDOF)]); end From c72ab02bd399948a8df6fc43ac42991e635c5a26 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 21 Nov 2023 10:06:31 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 203456b28b2..f48c46a1890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - No warning is printed if a sensor not supported by iDynTree is found in an URDF file (https://github.com/robotology/idyntree/pull/997). +### Fixed +- Fix `iDynTreeWrappers.loadReducedModel` when `model_path` argument does not end in `\` (https://github.com/robotology/idyntree/pull/1126). + ## [5.2.1] - 2022-05-19 ### Fixed