Skip to content

Expose Progressive::timeOut() to Python - #178

Open
thanhndv212 wants to merge 6 commits into
humanoid-path-planner:develfrom
thanhndv212:feat/progressive-timeout-binding
Open

Expose Progressive::timeOut() to Python#178
thanhndv212 wants to merge 6 commits into
humanoid-path-planner:develfrom
thanhndv212:feat/progressive-timeout-binding

Conversation

@thanhndv212

Copy link
Copy Markdown
Contributor

Summary

continuousValidation::Progressive gained a configurable timeOut()
getter/setter in hpp-core (humanoid-path-planner/hpp-core#450), replacing
a hardcoded 15s wall-clock bound in validateStraightPath(). This binds
it so it's reachable from Python — without it, the new setting isn't
actually usable by any project that only talks to hpp-core through these
bindings (as opposed to linking hpp-core directly).

Depends on hpp-core#450 — needs that PR's Progressive::timeOut()
C++ method to exist before this can build.

Change

pathValidation::Progressive's pybind wrapper stores the concrete
validator behind a generic PathValidationPtr_t. Added a
ProgressiveWrapper with static getter/setter functions that downcast
to continuousValidation::ProgressivePtr_t via HPP_DYNAMIC_PTR_CAST,
matching the existing PVWrapper pattern already used for
validate()/validateConfiguration(). Bound as an overloaded timeOut
method (get with no args, set with a float arg) on the Progressive
Python class.

Testing

Built against a local hpp-core checkout with #450's changes applied;
verified from Python:

from pyhpp.core import Progressive
from pyhpp.pinocchio import Device
d = Device('test')
prog = Progressive(d, 0.001)
prog.timeOut()       # -> 15.0 (default, matches prior hardcoded value)
prog.timeOut(45.0)
prog.timeOut()       # -> 45.0

thanhndv212 and others added 2 commits August 7, 2026 14:54
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().
@thanhndv212
thanhndv212 marked this pull request as draft August 7, 2026 18:02
@thanhndv212
thanhndv212 marked this pull request as ready for review August 7, 2026 18:03
@thanhndv212

Copy link
Copy Markdown
Contributor Author

@florent-lamiraux @psardin001 could you please have a look on this one as well?

Comment thread src/pyhpp/core/path-validation.cc
thanhndv212 and others added 2 commits August 18, 2026 15:59
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
@thanhndv212

thanhndv212 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

Nix build failure seems to be related to hpp-core being pinned to the release tag v9.0.2, which have not included my recent commit 2edec8d5 on devel branch. Otherwise, it should be good.

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.

3 participants