Skip to content

Commit

Permalink
Merge pull request #820 from robotology/devel
Browse files Browse the repository at this point in the history
Merge devel in master and release 3.0.0
  • Loading branch information
traversaro authored Feb 3, 2021
2 parents 46ac296 + 704bc7b commit 918084f
Show file tree
Hide file tree
Showing 197 changed files with 7,860 additions and 4,394 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- cron: '0 2 * * *'

env:
vcpkg_robotology_TAG: v0.5.0
vcpkg_robotology_TAG: v0.6.0
YCM_TAG: v0.12.0
YARP_TAG: v3.4.1
ICUB_TAG: v1.17.0
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Dependencies [macOS]
if: matrix.os == 'macOS-latest'
run: |
brew install ace assimp boost eigen ipopt swig qt5
brew install ace assimp boost eigen ipopt irrlicht swig qt5
- name: Dependencies [Ubuntu]
if: contains(matrix.os, 'ubuntu')
Expand All @@ -137,7 +137,7 @@ jobs:
sudo apt-get install \
git build-essential cmake libace-dev coinor-libipopt-dev libeigen3-dev swig \
qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev libqt5charts5-dev \
libxml2-dev liboctave-dev python-dev python3-numpy valgrind libassimp-dev
libxml2-dev liboctave-dev python-dev python3-numpy valgrind libassimp-dev libirrlicht-dev
- name: Cache Source-based Dependencies
id: cache-source-deps
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_ASSIMP:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=OFF -DIDYNTREE_USES_ICUB_MAIN:BOOL=OFF -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON \
-DIDYNTREE_USES_PYTHON:BOOL=OFF -DIDYNTREE_USES_OCTAVE:BOOL=OFF -DIDYNTREE_USES_IPOPT:BOOL=ON \
-DIDYNTREE_USES_PYTHON:BOOL=OFF -DIDYNTREE_USES_OCTAVE:BOOL=OFF -DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
- name: Configure [Ubuntu/macOS]
Expand All @@ -232,7 +232,7 @@ jobs:
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=ON \
-DIDYNTREE_USES_ICUB_MAIN:BOOL=ON -DIDYNTREE_USES_Qt5:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DIDYNTREE_USES_ASSIMP:BOOL=ON \
-DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_OCTAVE:BOOL=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
-DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_OCTAVE:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
- name: Enable additional Ubuntu options (Valgrind, Python) [Ubuntu]
if: contains(matrix.os, 'ubuntu')
Expand All @@ -258,7 +258,8 @@ jobs:
shell: bash
run: |
cd build
ctest --output-on-failure -C ${{ matrix.build_type }} .
# Visualizer tests excluded as a workaround for https://github.com/robotology/idyntree/issues/808
ctest --output-on-failure -C ${{ matrix.build_type }} -E "Visualizer" .
- name: Install [Windows]
if: matrix.os == 'windows-latest'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/regenerate-matlab-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ jobs:
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.0] - 2020-02-03

### Added
- Add the possibility to plot and update frames in the Matlab visualizer.
- Added ``getFileLocationOnLocalFileSystem`` method in ``ExternalMesh`` that attempts to find the mesh location in the local file system. This is now used by the ``Visualizer`` when loading the robot model (https://github.com/robotology/idyntree/pull/798). This can also be used by the `iDynTreeWrapper.prepareVisualization` MATLAB function, if `meshFilePrefix` is explicitly set to `""` (https://github.com/robotology/idyntree/pull/817).
- Add the possibility to extract submatrix with MatrixView (https://github.com/robotology/idyntree/pull/800)
- Improved the Visualizer library: camera animations and corrections, interface for frames and texture, fix of ``STL`` visualization. These improvements also include mouse control support for the camera, also in the `idyntree-model-view` application (https://github.com/robotology/idyntree/pull/802).

### Changed
- Promoted the functions `computeBoundingBoxFromShape` and `computeBoxVertices` to public in the `idyntree-solid-shapes` library (https://github.com/robotology/idyntree/pull/801).
- The `idyntree-yarp` and `idyntree-icub` libraries are now header-only, and are always installed even if `IDYNTREE_USES_YARP` or `IDYNTREE_USES_ICUB_MAIN` are set to `OFF`, to simplify deployment of the library. The downstream libraries that want to use them need to find and link `YARP` and `ICUB` CMake packages on their own (https://github.com/robotology/idyntree/pull/807).

### Fixed
- Fixed the `IDYNTREE_USES_IRRLICHT` option when `irrlicht` is installed via vcpkg (https://github.com/robotology/idyntree/pull/806).


## [2.0.3] - 2020-02-03

### Fixed
Expand Down
11 changes: 1 addition & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

cmake_minimum_required(VERSION 3.16)

project(iDynTree VERSION 2.0.3
project(iDynTree VERSION 3.0.0
LANGUAGES C CXX)

# Disable in source build, unless Eclipse is used
Expand Down Expand Up @@ -57,15 +57,6 @@ if(NOT IDYNTREE_ONLY_DOCS)
# add the actual components of the library
add_subdirectory(src)

# List exported CMake package dependencies
set(_IDYNTREE_EXPORTED_DEPENDENCIES "")
if(IDYNTREE_USES_YARP)
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES YARP)
endif()
if(IDYNTREE_USES_ICUB_MAIN)
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES ICUB)
endif()

# List exported CMake package dependencies when the library is compiled as static
set(_IDYNTREE_EXPORTED_DEPENDENCIES_ONLY_STATIC "")
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES_ONLY_STATIC LibXml2)
Expand Down
19 changes: 12 additions & 7 deletions bindings/matlab/+iDynTreeWrappers/getMeshes.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% - Iputs:
% - `model` : iDyntree model loaded from a URDF.
% - `meshFilePrefix` : Path in which we can find the meshes. As an example the path to the mesh in a iCub urdf is `'package://iCub/meshes/simmechanics/sim_sea_2-5_root_link_prt-binary.stl'
% `. `meshFilePrefix` should replace package to allow to find the rest of the path.
% `. `meshFilePrefix` should replace package to allow to find the rest of the path. If the value is "", the standard iDynTree workflow of locating the mesh via the ExternalMesh.getFileLocationOnLocalFileSystem method is used.
% - Outputs:
% - `map` : Cell array having both the names of the meshes and the associated link
% - `linkMeshInfo` : Struct array that contain the link name and a struct (`meshInfo`) that contains the name of file or if is a simple geometry, the triangulation ( edges and vertices of the mesh ) and the link to geometry transform.
Expand Down Expand Up @@ -41,13 +41,18 @@
if solidarray{solids}.isExternalMesh
externalMesh=solidarray{solids}.asExternalMesh;
scale=externalMesh.getScale.toMatlab;
meshName=split(externalMesh.getFilename,':');
meshFile=meshName{2};
% Import an STL mesh, returning a PATCH-compatible face-vertex structure
if strcmp('package',meshName{1})
mesh_triangles = stlread([meshFilePrefix meshFile]);
if(meshFilePrefix == "")
meshFile = externalMesh.getFilename;
mesh_triangles = stlread(externalMesh.getFileLocationOnLocalFileSystem);
else
mesh_triangles = stlread(meshFile);
meshName=split(externalMesh.getFilename,':');
meshFile=meshName{2};
% Import an STL mesh, returning a PATCH-compatible face-vertex structure
if strcmp('package',meshName{1})
mesh_triangles = stlread([meshFilePrefix meshFile]);
else
mesh_triangles = stlread(meshFile);
end
end
meshInfo(solids).meshFile=meshFile;
meshInfo(solids).scale=scale';
Expand Down
44 changes: 44 additions & 0 deletions bindings/matlab/+iDynTreeWrappers/plotFrame.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
function frame = plotFrame(transform, axisDimension, lineWidth)

%% plotFrame
% plotFrame adds a 3D frame in the current figure
% Inputs:
% - transform: The transform of the frame (4x4 matrix)
% - axisDimension: The dimension of the axes
% - lineWidth: The linewidth of the axes
% Outputs:
% - A struct that can be used with updateFrame to update the
% visualization
%
% Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT). All rights reserved.
% This software may be modified and distributed under the terms of the
% GNU Lesser General Public License v2.1 or any later version.

hold on
parent=gca;

frame = struct();

R = transform(1:3, 1:3);

or = transform(1:3, 4);

p = [or, or, or] + axisDimension * R;

frame.axisDimension = axisDimension;
frame.lineWidth = lineWidth;

frame.x = plot3(parent, [or(1) p(1,1)], [or(2) p(2,1)], [or(3) p(3,1)], 'r', 'linewidth', lineWidth);
frame.y = plot3(parent, [or(1) p(1,2)], [or(2) p(2,2)], [or(3) p(3,2)], 'g', 'linewidth', lineWidth);
frame.z = plot3(parent, [or(1) p(1,3)], [or(2) p(2,3)], [or(3) p(3,3)], 'b', 'linewidth', lineWidth);

p_text = [or, or, or] + axisDimension * 1.25 * R;

frame.labels = struct();

frame.labels.x = text(parent, p_text(1,1), p_text(2,1), p_text(3,1), 'x', 'color', 'r');
frame.labels.y = text(parent, p_text(1,2), p_text(2,2), p_text(3,2), 'y', 'color', 'g');
frame.labels.z = text(parent, p_text(1,3), p_text(2,3), p_text(3,3), 'z', 'color', 'b');

end

10 changes: 2 additions & 8 deletions bindings/matlab/+iDynTreeWrappers/prepareVisualization.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
% - Inputs:
% - `KinDynModel` : iDyntreewrappers main variable. Contains the model.
% - `meshFilePrefix` : Path in which we can find the meshes. As an example the path to the mesh in a iCub urdf is `'package://iCub/meshes/simmechanics/sim_sea_2-5_root_link_prt-binary.stl'
% `. `meshFilePrefix` should replace package to allow to find the rest of the path.
% `. `meshFilePrefix` should replace package to allow to find the rest of the path. If the value is "", the standard iDynTree workflow of locating the mesh via the ExternalMesh.getFileLocationOnLocalFileSystem method is used.
% - Optional Inputs:
% - `view` : Selects the angle in which the figure is seen.
% - `material` : Selects effect with which the patch is rendered. Options are : 'dull','metal','shiny';
Expand Down Expand Up @@ -124,13 +124,7 @@
% linewidth value 1 = to 0.35mm. It is better if we increase the linewidth
% in proportion to the axisSize of the frame.c
linewidthSize=frameAxisSize*50;
plot3(parent, [0 frameAxisSize], [0 0], [0 0], 'r', 'linewidth', linewidthSize);
plot3(parent, [0 0], [0 frameAxisSize], [0 0], 'g', 'linewidth', linewidthSize);
plot3(parent, [0 0], [0 0], [0 frameAxisSize], 'b', 'linewidth', linewidthSize);
axisTextDistance = frameAxisSize+frameAxisSize*.2;
text(parent, axisTextDistance, 0, 0, 'x', 'color', 'r');
text(parent, 0, axisTextDistance, 0, 'y', 'color', 'g');
text(parent, 0, 0, axisTextDistance, 'z', 'color', 'b');
iDynTreeWrappers.plotFrame(eye(4), frameAxisSize, linewidthSize);

% Axis labels
title('Robot Visualizer ');
Expand Down
30 changes: 30 additions & 0 deletions bindings/matlab/+iDynTreeWrappers/updateFrame.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function updateFrame(frame, newTransform)

%% updateFrame
% updateFrame updates a 3D frame added with the plotFrame function
% Inputs:
% - frame: The struct output by plotFrame
% - newTransform : The new 3D transformation (4x4 matrix)
%
% Copyright (C) 2020 Istituto Italiano di Tecnologia (IIT). All rights reserved.
% This software may be modified and distributed under the terms of the
% GNU Lesser General Public License v2.1 or any later version.

R = newTransform(1:3, 1:3);

or = newTransform(1:3, 4);

p = [or, or, or] + frame.axisDimension * R;

set(frame.x, 'XData', [or(1) p(1,1)], 'YData', [or(2) p(2,1)], 'ZData', [or(3) p(3,1)]);
set(frame.y, 'XData', [or(1) p(1,2)], 'YData', [or(2) p(2,2)], 'ZData', [or(3) p(3,2)]);
set(frame.z, 'XData', [or(1) p(1,3)], 'YData', [or(2) p(2,3)], 'ZData', [or(3) p(3,3)]);

p_text = [or, or, or] + frame.axisDimension * 1.25 * R;

set(frame.labels.x, 'Position', p_text(1:3,1));
set(frame.labels.y, 'Position', p_text(1:3,2));
set(frame.labels.z, 'Position', p_text(1:3,3));

end

30 changes: 15 additions & 15 deletions bindings/matlab/autogenerated/+iDynTree/AccelerometerSensor.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,55 @@
self.swigPtr = varargin{1}.swigPtr;
end
else
tmp = iDynTreeMEX(1316, varargin{:});
tmp = iDynTreeMEX(1318, varargin{:});
self.swigPtr = tmp.swigPtr;
tmp.SwigClear();
end
end
function delete(self)
if self.swigPtr
iDynTreeMEX(1317, self);
iDynTreeMEX(1319, self);
self.SwigClear();
end
end
function varargout = setName(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1318, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1320, self, varargin{:});
end
function varargout = setLinkSensorTransform(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1319, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1321, self, varargin{:});
end
function varargout = setParentLink(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1320, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1322, self, varargin{:});
end
function varargout = setParentLinkIndex(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1321, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1323, self, varargin{:});
end
function varargout = getName(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1322, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1324, self, varargin{:});
end
function varargout = getSensorType(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1323, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1325, self, varargin{:});
end
function varargout = getParentLink(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1324, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1326, self, varargin{:});
end
function varargout = getParentLinkIndex(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1325, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1327, self, varargin{:});
end
function varargout = getLinkSensorTransform(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1326, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1328, self, varargin{:});
end
function varargout = isValid(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1327, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1329, self, varargin{:});
end
function varargout = clone(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1328, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1330, self, varargin{:});
end
function varargout = updateIndices(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1329, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1331, self, varargin{:});
end
function varargout = predictMeasurement(self,varargin)
[varargout{1:nargout}] = iDynTreeMEX(1330, self, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1332, self, varargin{:});
end
end
methods(Static)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function varargout = ArticulatedBodyAlgorithm(varargin)
[varargout{1:nargout}] = iDynTreeMEX(1233, varargin{:});
[varargout{1:nargout}] = iDynTreeMEX(1235, varargin{:});
end
Loading

0 comments on commit 918084f

Please sign in to comment.