Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/pyhpp/core/path-validation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -184,7 +197,11 @@ void exposePathValidation() {
class_<pathValidation::Progressive, bases<PathValidation>>(
"Progressive", "Create a progressive continuous path validation.",
init<const hpp::core::DevicePtr_t&, const hpp::core::value_type&>(
(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_<pathValidation::Dichotomy, bases<PathValidation>>(
"Dichotomy", "Create a dichotomy-based continuous path validation.",
init<const hpp::core::DevicePtr_t&, const hpp::core::value_type&>(
Expand Down
Loading