Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate collision specific features in pinocchio_default #2517

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ jobs:
- name: Set and install dependencies
run: |
export PYTHON3_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))")
# Force eigenpy 3.10.0 to be compatible with hpp-fcl
export APT_DEPENDENCIES="doxygen \
ccache \
curl \
Expand All @@ -104,8 +103,8 @@ jobs:
libboost-python-dev \
python3-numpy \
python3-matplotlib \
robotpkg-py${PYTHON3_VERSION}-eigenpy=3.10.0 \
robotpkg-py${PYTHON3_VERSION}-hpp-fcl \
robotpkg-py${PYTHON3_VERSION}-eigenpy \
robotpkg-py${PYTHON3_VERSION}-coal \
robotpkg-py${PYTHON3_VERSION}-casadi"
echo $APT_DEPENDENCIES

Expand All @@ -126,6 +125,7 @@ jobs:
export PYTHON3_DOT_VERSION=$(python3 -c "import sys; print(str(sys.version_info.major)+'.'+str(sys.version_info.minor))")
export PYTHONPATH=${PYTHONPATH}:/opt/openrobots/lib/python$PYTHON3_DOT_VERSION/site-packages
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openrobots/lib:/usr/local/lib:/usr/lib:/usr/lib/x86_64-linux-gnu
export CMAKE_PREFIX_PATH=/opt/openrobots/lib

mkdir build
cd build
Expand All @@ -150,6 +150,7 @@ jobs:
export PATH=$PATH:/opt/openrobots/bin
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/openrobots/lib/pkgconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openrobots/lib:/usr/local/lib:/usr/lib:/usr/lib/x86_64-linux-gnu
export CMAKE_PREFIX_PATH=/opt/openrobots/lib
cd ./unittest/packaging/cmake
mkdir build
cd build
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changed
- On GNU/Linux and macOS, hide all symbols by default ([#2469](https://github.com/stack-of-tasks/pinocchio/pull/2469))
- Build `pinocchio_default` with collision features ([#2517](https://github.com/stack-of-tasks/pinocchio/pull/2517))

## [3.3.0] - 2024-11-06

Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,7 @@ else()
endif()

if(BUILD_WITH_HPP_FCL_SUPPORT)
list(APPEND CFLAGS_DEPENDENCIES "-DPINOCCHIO_WITH_HPP_FCL")
list(APPEND LIBRARIES_DEPENDENCIES ${PROJECT_NAME}_collision)
add_project_dependency(hpp-fcl 2.1.2 REQUIRED PKG_CONFIG_REQUIRES "hpp-fcl >= 2.1.2")
add_project_dependency(hpp-fcl 2.1.2 REQUIRED "hpp-fcl >= 2.1.2")
endif()

if(BUILD_WITH_ACCELERATE_SUPPORT)
Expand Down
10 changes: 10 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ add_header_group(${PROJECT_NAME}_CORE_GENERATED_PUBLIC_HEADERS)
# This target will also have hpp-fcl and workspace module in it.
pinocchio_specific_type(default DEFAULT_SCOPE)

# Some core library algorithms have different behavior if PINOCCHIO_WITH_HPP_FCL is defined. Since
# some are template instantiated, or some user can link only on pinocchio_default, we muste define
# PINOCCHIO_WITH_HPP_FCL in pinocchio_default.
if(BUILD_WITH_HPP_FCL_SUPPORT)
target_compile_definitions(pinocchio_default PUBLIC PINOCCHIO_WITH_HPP_FCL)
target_include_directories(
pinocchio_default PUBLIC $<TARGET_PROPERTY:hpp-fcl::hpp-fcl,INTERFACE_INCLUDE_DIRECTORIES>)

endif()

# Define the extra target This target hold extra algorithms.
if(BUILD_WITH_EXTRA_SUPPORT)
set(EXTRA_LIB_NAME "${PROJECT_NAME}_extra")
Expand Down
Loading