Skip to content

Port towards jrl-v2 - #2923

Open
j-matheron wants to merge 32 commits into
stack-of-tasks:develfrom
j-matheron:topic/jrl-next
Open

Port towards jrl-v2#2923
j-matheron wants to merge 32 commits into
stack-of-tasks:develfrom
j-matheron:topic/jrl-next

Conversation

@j-matheron

@j-matheron j-matheron commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Port pinocchio towards jrl-v2

Checklist

  • I have run pre-commit run --all-files or pixi run lint
  • I have performed a self-review of my own code
  • I have commented my code where necessary
  • I have made corresponding changes to the doxygen documentation
  • I have added tests that prove my fix or feature works
  • I have updated the CHANGELOG or added the "no changelog" label if it's a CI-related issue
  • I have updated the README credits section

TODO

  • Update release process
    • Edit development/release.md to use jrl-release.py
    • Edit release environment to ease the process
  • Add a cmake/get-example-robot-data.cmake script to be able to fetch content example-robot-data (back compatibility)

-[ ] support static library -> closes #2918
closes #2906

Comment thread pixi.toml
Comment thread pixi.toml

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hi,
This is a reminder message to assign an extra build label to this Pull Request if needed.
By default, this PR will be build with minimal build options (URDF support and Python bindings)
The possible extra labels are:

  • build_collision (build Pinocchio with coal support)
  • build_casadi (build Pinocchio with CasADi support)
  • build_autodiff (build Pinocchio with CppAD support)
  • build_codegen (build Pinocchio with CppADCodeGen support)
  • build_extra (build Pinocchio with extra algorithms)
  • build_mpfr (build Pinocchio with Boost.Multiprecision support)
  • build_sdf (build Pinocchio with SDF parser)
  • build_accelerate (build Pinocchio with APPLE Accelerate framework support)
  • build_all (build Pinocchio with ALL the options stated above)

Thanks.
The Pinocchio development team.

Comment thread CMakeLists.txt
Comment on lines +87 to +88
# TODO why not neccessary in Simple
set(Boost_USE_DEBUG_RUNTIME OFF)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should investigate this issue before merging

Comment thread unittest/joint-prismatic.cpp Outdated
Comment thread .gitmodules Outdated
Comment thread CMakeLists.txt Outdated
Comment on lines +805 to +821
list(APPEND SDF_VERSIONS "")
foreach(version IN LISTS SDF_VERSIONS)
find_package(SDFormat${version} QUIET)
if(SDFormat${version}_FOUND)
set(SDFormat_FOUND True)
jrl_find_package(SDFormat${version} CONFIG)
message(STATUS "SDFormat${version} Found")
add_library(pinocchio_sdformat ALIAS sdformat${version}::sdformat${version})
break()
endif()
endforeach(version)
if(NOT SDFormat_FOUND)
message(
FATAL_ERROR
"SDFormat not found. Accepted versions: ${SDF_VERSIONS}"
)
endif()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be done in the find-package part of the cmake.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you push it ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, now it is pushed

Comment thread unittest/cpp/casadi-integrate-derivatives.cpp Outdated
)

add_pinocchio_unit_test(value)
if(BUILD_WITH_COLLISION_SUPPORT)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing:

if(BUILD_WITH_URDF_SUPPORT)
  ...
  if(BUILD_WITH_COLLISION_SUPPORT)
    ...
  endif()
endif()

We can try to do this:

if(BUILD_WITH_URDF_SUPPORT)
  ...
endif()

if(BUILD_WITH_URDF_SUPPORT and BUILD_WITH_COLLISION_SUPPORT)
  ...
endif()

I think this improve readability.

Comment thread unittest/cpp/CMakeLists.txt Outdated
add_pinocchio_unit_test(compute-all-terms)
add_pinocchio_unit_test(energy)
add_pinocchio_unit_test(frames)
if(NOT MSVC AND NOT MSVC_VERSION)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: try to remove this condition before merging

Comment thread unittest/cpp/CMakeLists.txt Outdated
endif()

if(BUILD_WITH_AUTODIFF_SUPPORT)
macro(ADD_CPPAD_UNIT_TEST name)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: I think the macro is useless. Linking againts pinocchio should do the job

Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread include/pinocchio/src/autodiff/casadi/algorithm/algo.hxx
Comment thread unittest/cpp/CMakeLists.txt Outdated
add_dependencies(pinocchio-test-cpp-cppad pinocchio-test-cpp-${name})
target_link_libraries(
pinocchio-test-cpp-${name}
PRIVATE pinocchio_cppad_headers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PRIVATE pinocchio_cppad_headers
PRIVATE pinocchio_cppad

If we link against pinocchio_cppad_headers, we will not benefit from explicit template instantiation.

@j-matheron j-matheron Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not link otherwise

)
target_link_libraries(
pinocchio-test-cpp-${name}
PRIVATE pinocchio_cppadcg_headers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PRIVATE pinocchio_cppadcg_headers
PRIVATE pinocchio_cppadcg

@j-matheron j-matheron Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not link otherwise

)
target_link_libraries(
pinocchio-test-cpp-${name}
PRIVATE pinocchio_casadi_headers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PRIVATE pinocchio_casadi_headers
PRIVATE pinocchio_casadi

@j-matheron j-matheron Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does not link otherwise

Comment thread unittest/python/CMakeLists.txt Outdated
#
include(${JRL_CMAKE_MODULES}/python-helpers.cmake)

set(${PROJECT_NAME}_PYTHON_TESTS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing a list and calling pinocchio_python_add_test in a foreach loop we can directly call pinocchio_python_add_test on each entry.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread unittest/python/casadi/CMakeLists.txt Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like in C++ no need to put that in a separated directory.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread bindings/python/CMakeLists.txt Outdated
Comment on lines +436 to +437
PATTERN "*.so"
PATTERN "*.pyd"

@ahoarau ahoarau Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guilhem commented on another repo that we need to install the bindings as TARGETS for RPATH to work properly (which does not when installed like this via directory install).

So we need to add a install(TARGETS .... DESTINATION ${python_install_dir}/pinocchio)

And remove the PATTERN that installs *.so and *.pyd

ref: https://github.com/ahoarau/proxsuite/blob/7608c9e65e680fdef9efe69e1a6d0acd27f4ab93/bindings/python/CMakeLists.txt#L157-L167

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support static library build Policy CMP0167 is not set

3 participants