Skip to content

Commit

Permalink
Merge branch 'devel' into dependabot/github_actions/ros-industrial/in…
Browse files Browse the repository at this point in the history
…dustrial_ci-3ed9846c96ed1e0bb36193e8e250632eaac980d0
  • Loading branch information
jcarpent authored Nov 27, 2023
2 parents 309989c + fb0cd56 commit 018ca8b
Show file tree
Hide file tree
Showing 305 changed files with 1,719 additions and 348 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/check-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Check-changelog
on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
branches:
- devel
jobs:
check-changelog:
name: Check changelog action
runs-on: ubuntu-latest
steps:
- uses: tarides/changelog-check-action@v2
with:
changelog: CHANGELOG.md
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
CCACHE_DIR: /github/home/.ccache

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-linux-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
BUILD_ADVANCED_TESTING: ON

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ros-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
strategy:
matrix:
env:
- {ROS_DISTRO: melodic}
- {ROS_DISTRO: noetic}
- {ROS_DISTRO: rolling, BUILDER: colcon}
env:
Expand All @@ -30,7 +29,7 @@ jobs:
IMMEDIATE_TEST_OUTPUT: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
# This step will fetch/store the directory used by ccache before/after the ci run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-conda-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
compiler: clang-cl

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-conda-v142.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os: windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule update --init
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_branch: 'devel'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-json
- id: check-symlinks
Expand Down
886 changes: 886 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

156 changes: 74 additions & 82 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
#

CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)

SET(PROJECT_NAME pinocchio)
SET(PROJECT_DESCRIPTION "A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives")
Expand Down Expand Up @@ -49,12 +49,6 @@ IF(CMAKE_VERSION VERSION_GREATER "3.12")
CMAKE_POLICY(SET CMP0074 NEW)
ENDIF()

IF(WIN32)
SET(LINK copy_if_different)
ELSE(WIN32)
SET(LINK create_symlink)
ENDIF(WIN32)

# --- OPTIONS ----------------------------------------
OPTION(BUILD_BENCHMARK "Build the benchmarks" OFF)
OPTION(BUILD_UTILS "Build the utils" OFF)
Expand Down Expand Up @@ -186,7 +180,7 @@ ENDIF(BUILD_PYTHON_INTERFACE)
IF(BUILD_WITH_HPP_FCL_SUPPORT)
ADD_DEFINITIONS(-DPINOCCHIO_WITH_HPP_FCL)
LIST(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_HPP_FCL")
ADD_PROJECT_DEPENDENCY(hpp-fcl 1.7.3 REQUIRED PKG_CONFIG_REQUIRES "hpp-fcl >= 1.7.3")
ADD_PROJECT_DEPENDENCY(hpp-fcl 2.0.0 REQUIRED PKG_CONFIG_REQUIRES "hpp-fcl >= 2.0.0")
# Check whether hpp-fcl python bindings are available.
SET(BUILD_WITH_HPP_FCL_PYTHON_BINDINGS FALSE)
IF(BUILD_PYTHON_INTERFACE)
Expand All @@ -204,86 +198,84 @@ IF(BUILD_WITH_HPP_FCL_SUPPORT)
ENDIF(BUILD_PYTHON_INTERFACE)
ENDIF(BUILD_WITH_HPP_FCL_SUPPORT)

# Sources definition
INCLUDE(sources.cmake)

# URDF sources
IF(BUILD_WITH_URDF_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_CORE_SOURCES ${${PROJECT_NAME}_URDF_SOURCES})
LIST(APPEND ${PROJECT_NAME}_CORE_PUBLIC_HEADERS ${${PROJECT_NAME}_URDF_PUBLIC_HEADERS})
ENDIF(BUILD_WITH_URDF_SUPPORT)

# LibPython sources
IF(BUILD_WITH_LIBPYTHON)
LIST(APPEND ${PROJECT_NAME}_CORE_PUBLIC_HEADERS
${${PROJECT_NAME}_LIBPYTHON_PUBLIC_HEADERS})
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_SOURCES
${${PROJECT_NAME}_BINDINGS_PYTHON_LIBPYTHON_SOURCES})
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_PUBLIC_HEADERS
${${PROJECT_NAME}_BINDINGS_PYTHON_LIBPYTHON_PUBLIC_HEADERS})
ENDIF(BUILD_WITH_LIBPYTHON)

# HPP-FCL sources
IF(BUILD_WITH_HPP_FCL_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_CORE_PUBLIC_HEADERS
${${PROJECT_NAME}_HPP_FCL_PUBLIC_HEADERS})
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_SOURCES
${${PROJECT_NAME}_BINDINGS_PYTHON_HPP_FCL_SOURCES})
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_PUBLIC_HEADERS
${${PROJECT_NAME}_BINDINGS_PYTHON_HPP_FCL_PUBLIC_HEADERS})
ENDIF(BUILD_WITH_HPP_FCL_SUPPORT)

# OpenMP and HPP-FCL+OpenMP sources
IF(BUILD_WITH_OPENMP_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_SOURCES
${${PROJECT_NAME}_BINDINGS_PYTHON_OPENMP_SOURCES})
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_PUBLIC_HEADERS
${${PROJECT_NAME}_BINDINGS_PYTHON_OPENMP_PUBLIC_HEADERS})
IF(BUILD_WITH_HPP_FCL_SUPPORT)
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_SOURCES
${${PROJECT_NAME}_BINDINGS_PYTHON_HPP_FCL_OPENMP_SOURCES})
LIST(APPEND ${PROJECT_NAME}_BINDINGS_PYTHON_PUBLIC_HEADERS
${${PROJECT_NAME}_BINDINGS_PYTHON_HPP_FCL_OPENMP_PUBLIC_HEADERS})
ENDIF(BUILD_WITH_HPP_FCL_SUPPORT)
ENDIF()

# List headers to install
LIST(APPEND ${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_CORE_PUBLIC_HEADERS}
)
IF(BUILD_PYTHON_INTERFACE)
LIST(APPEND ${PROJECT_NAME}_HEADERS
${${PROJECT_NAME}_BINDINGS_PYTHON_PUBLIC_HEADERS}
)
ENDIF(BUILD_PYTHON_INTERFACE)

# Macros to update sources path in subdirs
FUNCTION(REMOVE_PATH_FROM_LIST list_name path_name dest_list)
SET(list_name_)
FOREACH(header ${${list_name}})
STRING(REGEX REPLACE "^${path_name}" "" header ${header})
LIST(APPEND list_name_ ${header})
ENDFOREACH(header ${list_name_})
SET(${dest_list} ${list_name_} PARENT_SCOPE)
ENDFUNCTION(REMOVE_PATH_FROM_LIST)

FUNCTION(PREPEND_PATH_FROM_LIST list_name path_name dest_list)
SET(list_name_)
FOREACH(header ${${list_name}})
SET(header "${path_name}/${header}")
LIST(APPEND list_name_ ${header})
ENDFOREACH(header ${list_name_})
SET(${dest_list} ${list_name_} PARENT_SCOPE)
ENDFUNCTION(PREPEND_PATH_FROM_LIST)

# Enforce the preprocessed version of boost::list and boost::vector
# This information is redundant with the content of include/pinocchio/container/boost-container-limits.hpp
# but it avoids any compilation issue.
ADD_DEFINITIONS(-DBOOST_MPL_LIMIT_LIST_SIZE=30)
ADD_DEFINITIONS(-DBOOST_MPL_LIMIT_VECTOR_SIZE=30)

# ----------------------------------------------------
# --- INCLUDE ----------------------------------------
# ----------------------------------------------------
FILE(GLOB_RECURSE HEADERS
${PROJECT_SOURCE_DIR}/src/*.hpp
${PROJECT_SOURCE_DIR}/src/*.hxx
)

IF(NOT BUILD_WITH_URDF_SUPPORT)
LIST(REMOVE_ITEM HEADERS
${PROJECT_SOURCE_DIR}/src/parsers/urdf.hpp
${PROJECT_SOURCE_DIR}/src/parsers/urdf/model.hxx
${PROJECT_SOURCE_DIR}/src/parsers/urdf/geometry.hxx
${PROJECT_SOURCE_DIR}/src/parsers/urdf/utils.hpp
${PROJECT_SOURCE_DIR}/src/parsers/urdf/types.hpp
)
ENDIF(NOT BUILD_WITH_URDF_SUPPORT)

IF(NOT BUILD_WITH_HPP_FCL_SUPPORT)
LIST(REMOVE_ITEM HEADERS
${PROJECT_SOURCE_DIR}/src/spatial/fcl-pinocchio-conversions.hpp
)
ENDIF(NOT BUILD_WITH_HPP_FCL_SUPPORT)

LIST(APPEND HEADERS macros.hpp)

MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/core")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/math")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/spatial")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/multibody")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/multibody/joint")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/multibody/liegroup")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/multibody/pool")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/multibody/visitor")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/parsers")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/parsers/urdf")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/utils")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/serialization")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/algorithm")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/algorithm/parallel")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/container")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/codegen")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/casadi")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/casadi/math")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/casadi/spatial")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/casadi/utils")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/cppad")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/cppad/spatial")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/cppad/math")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/cppad/algorithm")
MAKE_DIRECTORY("${${PROJECT_NAME}_BINARY_DIR}/include/pinocchio/autodiff/cppad/utils")

SET(HEADERS_)
FOREACH(header ${HEADERS})
STRING(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/" "" header ${header})
LIST(APPEND HEADERS_ ${header})
GET_FILENAME_COMPONENT(headerName ${header} NAME)
GET_FILENAME_COMPONENT(headerPath ${header} PATH)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E ${LINK}
${${PROJECT_NAME}_SOURCE_DIR}/src/${header}
${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/${header})
INSTALL(FILES ${${PROJECT_NAME}_SOURCE_DIR}/src/${header}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/${headerPath}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
ENDFOREACH(header)
SET(HEADERS ${HEADERS_})

LIST(APPEND HEADERS
${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/config.hpp
${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/deprecated.hpp
${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/warning.hpp)

# --- MAIN LIBRARY -------------------------------------------------------------
ADD_SUBDIRECTORY(src)

Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
**Pinocchio** instantiates the state-of-the-art Rigid Body Algorithms for poly-articulated systems based on revisited Roy Featherstone's algorithms.
Besides, **Pinocchio** provides the analytical derivatives of the main Rigid-Body Algorithms like the Recursive Newton-Euler Algorithm or the Articulated-Body Algorithm.

**Pinocchio** is first tailored for robotics applications, but it can be used in extra contexts (biomechanics, computer graphics, vision, etc.).
**Pinocchio** was first tailored for robotics applications, but it can be used in other contexts (biomechanics, computer graphics, vision, etc.).
It is built upon Eigen for linear algebra and FCL for collision detection. **Pinocchio** comes with a Python interface for fast code prototyping, [directly accessible](https://github.com/conda-forge/pinocchio-feedstock#installing-pinocchio) through [Conda](https://docs.conda.io/en/latest/).

**Pinocchio** is now at the heart of various robotics software as [Crocoddyl](https://github.com/loco-3d/crocoddyl/tree/devel), an open-source and efficient Differential Dynamic Programming solver for robotics, the [Stack-of-Tasks](http://stack-of-tasks.github.io), an open-source and versatile hierarchical controller framework or the [Humanoid Path Planner](https://humanoid-path-planner.github.io/hpp-doc), open-source software for Motion and Manipulation Planning.
Expand Down Expand Up @@ -60,14 +60,14 @@ or via pip (currently only available on Linux):

- C++ template library,
- cache friendly,
- automatic code generation support via [CppADCodeGen](https://github.com/joaoleal/CppADCodeGen).
- automatic code generation support is available via [CppADCodeGen](https://github.com/joaoleal/CppADCodeGen).

**Pinocchio** is versatile, implementing basic and more advanced rigid body dynamics algorithms:

- forward kinematics and its analytical derivatives,
- forward/inverse dynamics and their analytical derivatives,
- centroidal dynamics and its analytical derivatives,
- support of multiple precision arithmetic via Boost.Multiprecision or any similar framework,
- support multiple precision arithmetic via Boost.Multiprecision or any similar framework,
- computations of kinematic and dynamic regressors for system identification and more,
- and much more with the support of modern and open-source Automatic Differentiation frameworks like [CppAD](https://github.com/coin-or/CppAD) or [CasADi](https://web.casadi.org/).

Expand All @@ -78,7 +78,7 @@ or via pip (currently only available on Linux):

**Pinocchio** is extensible.
**Pinocchio** is multi-thread friendly.
**Pinocchio** is reliable and extensively tested (unit-tests, simulations and real-world robotics applications).
**Pinocchio** is reliable and extensively tested (unit-tests, simulations, and real-world robotics applications).
**Pinocchio** is supported and tested on Windows, Mac OS X, Unix, and Linux ([see build status here](http://robotpkg.openrobots.org/rbulk/robotpkg/math/pinocchio/index.html)).

## Documentation
Expand Down Expand Up @@ -140,7 +140,7 @@ If you only need the Python bindings of Pinocchio, you may prefer to install it

### ROS

**Pinocchio** is also deployed on ROS. You may follow its deployment status below. If you're interested in using Pinocchio on systems and/or with packages that integrate with the ROS ecosystem, we recommend the installation of Pinocchio via the binaries distributed via the ROS PPA. Here, you can install Pinocchio using `sudo apt install ros-$ROS_DISTRO-pinocchio`. This installs Pinocchio with HPP-FCL support and with Python bindings. You can then depend on Pinocchio in your `package.xml` config (`<depend>pinocchio</depend>`) and include it via CMake (`find_package(pinocchio REQUIRED)`) -- we include support and hooks to discover the package for both ROS1 and ROS2. An example can be found [here](https://github.com/wxmerkt/pinocchio_ros_example). Please note that we advise always include the `pinocchio/fwd.hpp` header as the first include to avoid compilation errors from differing Boost-variant sizes.
**Pinocchio** is also deployed on ROS. You may follow its deployment status below. If you're interested in using Pinocchio on systems and/or with packages that integrate with the ROS ecosystem, we recommend the installation of Pinocchio via the binaries distributed via the ROS PPA. Here, you can install Pinocchio using `sudo apt install ros-$ROS_DISTRO-pinocchio`. This installs Pinocchio with HPP-FCL support and with Python bindings. You can then depend on Pinocchio in your `package.xml` config (`<depend>pinocchio</depend>`) and include it via CMake (`find_package(pinocchio REQUIRED)`) -- we include support and hooks to discover the package for both ROS1 and ROS2. An example can be found [here](https://github.com/wxmerkt/pinocchio_ros_example). Please note that we always advise including the `pinocchio/fwd.hpp` header as the first include to avoid compilation errors from differing Boost-variant sizes.

| ROS1 | | &nbsp;&nbsp;&nbsp;&nbsp; | ROS2 | |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -219,14 +219,16 @@ The following people have been involved in the development of **Pinocchio** and
- [Fabian Schramm](https://github.com/fabinsch) (Inria): core developper
- [Shubham Singh](https://github.com/shubhamsingh91) (UT Austin): second-order inverse dynamics derivatives
- [Stéphane Caron](https://scaron.info) (Inria): core developper
- [Joris Vaillant](https://github.com/jorisv) (Inria): core developer and manager of the project
- [Sebastian Castro](https://roboticseabass.com) (PickNik Robotics): MeshCat viewer features extension

If you have participated in the development of **Pinocchio**, please add your name and contribution to this list.

## Open-source projects relying on Pinocchio

- [Crocoddyl](https://github.com/loco-3d/crocoddyl) A software to realize model predictive control for complex robotics platforms.
- [TSID](https://github.com/stack-of-tasks/tsid/) A software that implements a Task Space Inverse Dynamics QP.
- [HPP](https://humanoid-path-planner.github.io/hpp-doc/ ) A SDK which implements motion planners for humanoids and other robots.
- [HPP](https://humanoid-path-planner.github.io/hpp-doc/ ) A SDK that implements motion planners for humanoids and other robots.
- [Jiminy](https://github.com/duburcqa/jiminy) A simulator based on Pinocchio.
- [ocs2](https://github.com/leggedrobotics/ocs2) A toolbox for Optimal Control for Switched Systems (OCS2)
- [TriFingerSimulation](https://github.com/open-dynamic-robot-initiative/trifinger_simulation) TriFinger Robot Simulation (a Robot to perform RL on manipulation).
Expand Down
Loading

0 comments on commit 018ca8b

Please sign in to comment.