From 2b65b6fb8fdb3e63224026cd0e8a2dd009fd8124 Mon Sep 17 00:00:00 2001 From: Mario Prats Date: Fri, 15 Sep 2023 15:01:01 +0200 Subject: [PATCH] set a non-infinite default timeout in CurrentState stage --- 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 ca48fb1b6..f03b37adb 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,13 +49,16 @@ namespace moveit { namespace task_constructor { namespace stages { +using namespace std::chrono_literals; +constexpr std::chrono::duration DEFAULT_TIMEOUT = 3s; + static const rclcpp::Logger LOGGER = rclcpp::get_logger("CurrentState"); 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) {