Skip to content

Commit

Permalink
Merge pull request #780 from robotology/devel
Browse files Browse the repository at this point in the history
Merge devel branch in master and release iDynTree 2.0.0
  • Loading branch information
traversaro authored Nov 22, 2020
2 parents c88754d + 324677d commit 17d5a7d
Show file tree
Hide file tree
Showing 712 changed files with 63,203 additions and 159,134 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ jobs:
- name: Dependencies [macOS]
if: matrix.os == 'macOS-latest'
run: |
brew install ace assimp boost eigen ipopt swig qt5 orocos-kdl
brew install ace assimp boost eigen ipopt swig qt5
- name: Dependencies [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install git build-essential cmake libace-dev coinor-libipopt-dev libboost-system-dev libboost-filesystem-dev \
libboost-thread-dev liborocos-kdl-dev libeigen3-dev swig qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev libqt5charts5-dev \
libxml2-dev liburdfdom-dev libtinyxml-dev liburdfdom-dev liboctave-dev python-dev valgrind libassimp-dev
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
- name: Cache Source-based Dependencies
id: cache-source-deps
Expand Down Expand Up @@ -173,11 +174,12 @@ jobs:
-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 ..
- name: Enable additional Ubuntu options (Valgrind, Python, legacy KDL) [Ubuntu]
- name: Enable additional Ubuntu options (Valgrind, Python) [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
cd build
cmake -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON -DIDYNTREE_USES_KDL:BOOL=ON .
# Assimp is disabled on Ubuntu as a workaround for https://github.com/robotology/idyntree/issues/663
cmake -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON .
# For some reason, Ubuntu 18.04 image in GitHub Actions contain OpenBLAS 0.3.5, that is affected by https://github.com/xianyi/OpenBLAS/issues/2003
# As a workaround, we test against the regular blas instead of openblas
sudo apt-get install libblas-dev libatlas-base-dev
Expand Down
126 changes: 126 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Python CI/CD

on:
push:
pull_request:
release:
types:
- published

jobs:

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.8

steps:

- uses: actions/checkout@master
- run: git fetch --prune --unshallow

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install sdist dependencies
run: pip install setuptools_scm cmake_build_extension

- name: Build sdist
run: python setup.py sdist

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
coinor-libipopt-dev \
libeigen3-dev swig \
libxml2-dev \
libassimp-dev
- name: Install sdist
run: pip -v install dist/*.tar.gz

- name: Test import
run: python -c 'import idyntree.bindings'

- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz

build_linux_wheels:

name: Build wheels on ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- 3.8
# - 3.9

steps:

- uses: actions/checkout@master
- run: git fetch --prune --unshallow

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
coinor-libipopt-dev \
libeigen3-dev swig \
libxml2-dev \
libassimp-dev
- name: '[Linux] Build wheel'
run: pip wheel -w wheelhouse .

- name: Remove other wheels
run: find wheelhouse/ -type f -not -name 'idyntree-*' -delete

# Rename the wheel to manylinux2014 (even if it is not) so that it can be uploaded to PyPI
- name: Rename wheels
run: |
ls wheelhouse/
find wheelhouse/ -type f -name "*.whl" -exec rename.ul linux manylinux2014 {} +
ls wheelhouse/
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

upload_pypi:
needs:
- build_sdist
- build_linux_wheels
runs-on: ubuntu-latest
# Devel branch produces pre-releases
# Master branch produces stable releases linked to GitHub releases
if: |
github.repository == 'robotology/idyntree' &&
((github.event_name == 'release' && github.event.action == 'published') ||
(github.event_name == 'push' && github.ref == 'refs/heads/devel'))
steps:

- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.0.0] - 2020-11-22

### Added
- Added a new CMake option `IDYNTREE_COMPILES_TOOLS` to disable compilation of iDynTree tools.
- Added a `KinDynComputations::getCentroidalTotalMomentumJacobian()` method (https://github.com/robotology/idyntree/pull/706)
- iDynTree now supports build compiled as a shared library also on Windows.
- When used in Python, new iDynTree objects can be constructed from generic iterable objects and NumPy arrays (`*.FromPython`),
and existing objects can be converted to NumPy arrays (`*.toNumPy`) (https://github.com/robotology/idyntree/pull/726).
- iDynTree Python bindings can now be installed with `pip3 install git+https://github.com/robotology/idyntree.git` (https://github.com/robotology/idyntree/pull/733).
- Implement the MatrixView class (https://github.com/robotology/idyntree/pull/734)
- Add the possibility to use `MatrixView` and `Span` as input/output objects for `KinDynComputations` class (https://github.com/robotology/idyntree/pull/736).
- New Python bindings based on [pybind11](https://github.com/pybind/pybind11).
They can be compiled by specifying the CMake option `IDYNTREE_USES_PYTHON_PYBIND11`. **Note** that the generated bindings are not
compatible with the SWIG-generated bindings (e.g. functions have different names). They can be imported as `idyntree.pybind` Python module.

### Fixed
- Fixed bug in `yarprobotstatepublisher` that caused segmentation fault each time an unknown joint name was read from the input joint states topic (https://github.com/robotology/idyntree/pull/719)
- Fixed bug in `CubicSpline()` that causes wrong coefficients calculation when boundary conditions are set (https://github.com/robotology/idyntree/pull/723)

### Changed
- By default iDynTree is compiled as a shared library also on Windows. The `BUILD_SHARED_LIBS` CMake variable can be used to
control if iDynTree is built as a shared or a static library.
- The Python method `*.fromPyList` is replaced by `*.FromPython` (https://github.com/robotology/idyntree/pull/726).
- The minimum required CMake version to configure and compile iDynTree is now 3.16 (https://github.com/robotology/idyntree/pull/732).
- The Python package name of the SWIG bindings changed from `iDynTree` to `idyntree.bindings` (https://github.com/robotology/idyntree/pull/733, https://github.com/robotology/idyntree/pull/735). To continue referring to iDynTree classes as `iDynTree.<ClassName>`, you can change your `import iDynTree` statements to `import idyntree.bindings as iDynTree`. Otherwise, you can use `import idyntree.bindings` to refer them as `idyntree.bindings.<ClassName>`.
- Improve the use of `const` keyword in `KinDynComputations`(https://github.com/robotology/idyntree/pull/736).
- Cleanup size and indices attributes. For consistency with std and Eigen, all sizes and indices have been changed to use std::size_t for unsigned quantities and std::ptrdiff_t for signed quantities. The only exception is the index stored in the triplets of the iDynTree::SparseMatrix data structure, that have been left defined to int for compatibility with Eigen (https://github.com/robotology/idyntree/pull/767).

### Removed
- Remove the CMake option IDYNTREE_USES_KDL and all the classes available when enabling it. They were deprecated in iDynTree 1.0 .
- Remove the semantics related classes. They were deprecated in iDynTree 1.0 .
- Remove unnecessary warning messages from [ModelSensorsTransformers.cpp](https://github.com/robotology/idyntree/blob/master/src/sensors/src/ModelSensorsTransformers.cpp) and [URDFDocument.cpp](https://github.com/robotology/idyntree/blob/master/src/model_io/urdf/src/URDFDocument.cpp) (see [PR 718](https://github.com/robotology/idyntree/pull/718))
- Python2 will not be maintained past 2020 and its support has been dropped (https://github.com/robotology/idyntree/pull/726).
- Remove the need to call `iDynTree.init_helpers()` and `iDynTree.init_numpy_helpers()` from Python (https://github.com/robotology/idyntree/pull/726).
- Remove headers and methods that were deprecated in iDynTree 1.0 (https://github.com/robotology/idyntree/pull/751).

## [1.2.0] - 2020-10-17

### Added
- Added the possibility of reusing an already opened figure with the MATLAB iDynTree Visualizer either if the name coincides or by using gcf.


### Changed
- `SolidShapes.h` public API **changes**. API changes are back compatible, but as the **ABI has changed**, this means a re-compilation of the dependent projects is needed. In details:
- Added getters and setters to all classes in `SolidShapes.h` (`idyntree-model`). Public attributes are still available for compatibility but are now **deprecated** and will be removed in the next major release of iDynTree (2.x).
Expand Down
20 changes: 11 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
# at your option.

cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.16)

project(iDynTree VERSION 1.2.0
project(iDynTree VERSION 2.0.0
LANGUAGES C CXX)

# Disable in source build, unless Eclipse is used
Expand Down Expand Up @@ -43,11 +43,16 @@ if(NOT IDYNTREE_ONLY_DOCS)
# anything) feel free to check the logic inside
add_subdirectory(extern)

# Create the absolute paths for the BIN DIRS.
foreach(item ${IDYNTREE_BINARY_DIRS})
list(APPEND ABSOLUTE_BIN_DIRS "${CMAKE_INSTALL_PREFIX}/${item}")
endforeach()

include(AddInstallRPATHSupport)
add_install_rpath_support(BIN_DIRS "${CMAKE_INSTALL_PREFIX}/bin"
LIB_DIRS "${CMAKE_INSTALL_PREFIX}/lib"
DEPENDS IDYNTREE_ENABLE_RPATH
USE_LINK_PATH)
add_install_rpath_support(BIN_DIRS ${ABSOLUTE_BIN_DIRS}
LIB_DIRS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
DEPENDS IDYNTREE_ENABLE_RPATH
USE_LINK_PATH)

# add the actual components of the library
add_subdirectory(src)
Expand All @@ -60,9 +65,6 @@ if(NOT IDYNTREE_ONLY_DOCS)
if(IDYNTREE_USES_ICUB_MAIN)
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES ICUB)
endif()
if(IDYNTREE_USES_KDL)
list(APPEND _IDYNTREE_EXPORTED_DEPENDENCIES orocos_kdl)
endif()

# List exported CMake package dependencies when the library is compiled as static
set(_IDYNTREE_EXPORTED_DEPENDENCIES_ONLY_STATIC "")
Expand Down
Loading

0 comments on commit 17d5a7d

Please sign in to comment.