diff --git a/src/pyhpp/core/path-validation.cc b/src/pyhpp/core/path-validation.cc index 6daf7dd..1dec071 100644 --- a/src/pyhpp/core/path-validation.cc +++ b/src/pyhpp/core/path-validation.cc @@ -133,6 +133,19 @@ 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 +197,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(