From 78b804213c7ad89b480aa1bde673a5b2106c6d4b Mon Sep 17 00:00:00 2001 From: thanhndv212 Date: Fri, 7 Aug 2026 14:54:09 +0200 Subject: [PATCH 1/6] [core] Expose Progressive::timeOut() to Python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hpp-core's continuousValidation::Progressive gained a configurable timeOut() getter/setter (humanoid-path-planner/hpp-core#450, replacing a hardcoded 15s wall-clock bound in validateStraightPath()). Bind it so it's reachable from Python, not just C++ — otherwise it isn't actually usable by any of this project's downstream consumers, which only interact with hpp-core through these bindings. pv->obj is the generic PathValidationPtr_t stored by the PathValidation wrapper; downcast to continuousValidation::ProgressivePtr_t to reach the concrete method, same pattern as the existing PVWrapper helpers for validate()/validateConfiguration(). --- src/pyhpp/core/path-validation.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pyhpp/core/path-validation.cc b/src/pyhpp/core/path-validation.cc index 6daf7dd..9b300b3 100644 --- a/src/pyhpp/core/path-validation.cc +++ b/src/pyhpp/core/path-validation.cc @@ -133,6 +133,20 @@ struct Progressive : PathValidation { tolerance) {} }; +struct ProgressiveWrapper { + static hpp::core::value_type getTimeOut(PathValidation* pv) { + return HPP_DYNAMIC_PTR_CAST(hpp::core::continuousValidation::Progressive, + pv->obj) + ->timeOut(); + } + static void setTimeOut(PathValidation* pv, + const hpp::core::value_type& timeOut) { + HPP_DYNAMIC_PTR_CAST(hpp::core::continuousValidation::Progressive, + pv->obj) + ->timeOut(timeOut); + } +}; + struct Dichotomy : PathValidation { Dichotomy(const hpp::core::DevicePtr_t& robot, const hpp::core::value_type& tolerance) @@ -184,7 +198,11 @@ void exposePathValidation() { class_>( "Progressive", "Create a progressive continuous path validation.", init( - (arg("robot"), arg("tolerance")))); + (arg("robot"), arg("tolerance")))) + .def("timeOut", &pathValidation::ProgressiveWrapper::getTimeOut, + "Get wall-clock timeout (seconds) for path validation.") + .def("timeOut", &pathValidation::ProgressiveWrapper::setTimeOut, + "Set wall-clock timeout (seconds) for path validation."); class_>( "Dichotomy", "Create a dichotomy-based continuous path validation.", init( From b7a046bd821964dec1df705a6642ddc40e3b16a8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 12:54:37 +0000 Subject: [PATCH 2/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pyhpp/core/path-validation.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pyhpp/core/path-validation.cc b/src/pyhpp/core/path-validation.cc index 9b300b3..1dec071 100644 --- a/src/pyhpp/core/path-validation.cc +++ b/src/pyhpp/core/path-validation.cc @@ -141,8 +141,7 @@ struct ProgressiveWrapper { } static void setTimeOut(PathValidation* pv, const hpp::core::value_type& timeOut) { - HPP_DYNAMIC_PTR_CAST(hpp::core::continuousValidation::Progressive, - pv->obj) + HPP_DYNAMIC_PTR_CAST(hpp::core::continuousValidation::Progressive, pv->obj) ->timeOut(timeOut); } }; From c80368a76546bf44d832ea574cd00317fa13cd5c Mon Sep 17 00:00:00 2001 From: thanhndv212 Date: Tue, 18 Aug 2026 15:59:06 +0200 Subject: [PATCH 3/6] fix(core): keep Progressive's factory in sync with setTimeOut setTimeOut only patched the live obj, so any Progressive instance later rebuilt from pv->factory (e.g. per-edge validators created by the manipulation constraint graph) silently reverted to hpp-core's default 15s timeout. Replace the factory with a closure that applies the configured timeout to freshly created instances too. Suggested-by: psardin001 --- src/pyhpp/core/path-validation.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/pyhpp/core/path-validation.cc b/src/pyhpp/core/path-validation.cc index 1dec071..b9f124c 100644 --- a/src/pyhpp/core/path-validation.cc +++ b/src/pyhpp/core/path-validation.cc @@ -141,8 +141,19 @@ struct ProgressiveWrapper { } static void setTimeOut(PathValidation* pv, const hpp::core::value_type& timeOut) { - HPP_DYNAMIC_PTR_CAST(hpp::core::continuousValidation::Progressive, pv->obj) - ->timeOut(timeOut); + auto progressive = HPP_DYNAMIC_PTR_CAST( + hpp::core::continuousValidation::Progressive, pv->obj); + progressive->timeOut(timeOut); + + pv->factory = + [timeOut](const hpp::core::DevicePtr_t& robot, + const hpp::core::value_type& tolerance) + -> hpp::core::PathValidationPtr_t { + auto result = hpp::core::continuousValidation::Progressive::create( + robot, tolerance); + result->timeOut(timeOut); + return result; + }; } }; From 7d760cf9254f716d661e8c837bf37c28ec31c6fb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2026 14:36:07 +0000 Subject: [PATCH 4/6] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pyhpp/core/path-validation.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pyhpp/core/path-validation.cc b/src/pyhpp/core/path-validation.cc index b9f124c..7bfec8d 100644 --- a/src/pyhpp/core/path-validation.cc +++ b/src/pyhpp/core/path-validation.cc @@ -145,10 +145,9 @@ struct ProgressiveWrapper { hpp::core::continuousValidation::Progressive, pv->obj); progressive->timeOut(timeOut); - pv->factory = - [timeOut](const hpp::core::DevicePtr_t& robot, - const hpp::core::value_type& tolerance) - -> hpp::core::PathValidationPtr_t { + pv->factory = [timeOut](const hpp::core::DevicePtr_t& robot, + const hpp::core::value_type& tolerance) + -> hpp::core::PathValidationPtr_t { auto result = hpp::core::continuousValidation::Progressive::create( robot, tolerance); result->timeOut(timeOut); From 872d6e44730196c307576ed89762b2002f7edb4a Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 18 Aug 2026 17:48:52 +0200 Subject: [PATCH 5/6] nix: switch to hpp-core devel for https://github.com/humanoid-path-planner/hpp-core/pull/450 --- flake.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index a044cc8..dbc89bb 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,20 @@ { description = "python bindings for HPP, based on boost python"; - inputs.gepetto.url = "github:gepetto/nix"; + inputs = { + gepetto.url = "github:gepetto/nix"; + hpp-core = { + url = "github:humanoid-path-planner/hpp-core"; + inputs.gepetto.follows = "gepetto"; + }; + }; outputs = inputs: inputs.gepetto.lib.mkFlakoboros inputs ( { lib, ... }: { + overlays = [ inputs.hpp-core.overlays.flakoboros ]; pyOverrideAttrs.hpp-python = { src = lib.fileset.toSource { root = ./.; From b0c63b817987098b20dc4724723c00cef1be2ee9 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 18 Aug 2026 17:49:10 +0200 Subject: [PATCH 6/6] nix: update lock --- flake.lock | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index d77b63b..3d2f99d 100644 --- a/flake.lock +++ b/flake.lock @@ -264,6 +264,26 @@ "type": "github" } }, + "hpp-core": { + "inputs": { + "gepetto": [ + "gepetto" + ] + }, + "locked": { + "lastModified": 1786116273, + "narHash": "sha256-WO9Xn1TYXQB6qrnluYYAYN6990YFEionBZtLsoJ6hSE=", + "owner": "humanoid-path-planner", + "repo": "hpp-core", + "rev": "13a5dffb644e50a71b53d0541bc99b0d65823202", + "type": "github" + }, + "original": { + "owner": "humanoid-path-planner", + "repo": "hpp-core", + "type": "github" + } + }, "nix-ros-overlay": { "inputs": { "flake-utils": "flake-utils", @@ -423,7 +443,8 @@ }, "root": { "inputs": { - "gepetto": "gepetto" + "gepetto": "gepetto", + "hpp-core": "hpp-core" } }, "rosdistro": {