From b0f388a88fe4f19680f431d5683341e8718e319d Mon Sep 17 00:00:00 2001 From: Sebastian Jahr Date: Fri, 6 Oct 2023 18:04:25 +0200 Subject: [PATCH] Set a non-infinite default timeout in CurrentState stage (#491) Co-authored-by: Mario Prats --- core/src/stages/current_state.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/stages/current_state.cpp b/core/src/stages/current_state.cpp index 822dc5c3..c185a677 100644 --- a/core/src/stages/current_state.cpp +++ b/core/src/stages/current_state.cpp @@ -35,6 +35,8 @@ /* Authors: Michael Goerner, Luca Lach, Robert Haschke */ +#include + #include #include #include @@ -47,11 +49,14 @@ namespace moveit { namespace task_constructor { namespace stages { +using namespace std::chrono_literals; +constexpr std::chrono::duration DEFAULT_TIMEOUT = 3s; + CurrentState::CurrentState(const std::string& name) : Generator(name) { auto& p = properties(); Property& timeout = p.property("timeout"); timeout.setDescription("max time to wait for get_planning_scene service"); - timeout.setValue(-1.0); + timeout.setValue(DEFAULT_TIMEOUT.count()); } void CurrentState::init(const moveit::core::RobotModelConstPtr& robot_model) {