From 78b804213c7ad89b480aa1bde673a5b2106c6d4b Mon Sep 17 00:00:00 2001 From: thanhndv212 Date: Fri, 7 Aug 2026 14:54:09 +0200 Subject: [PATCH 1/2] [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/2] [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); } };