diff --git a/cfg/PlayMotionModule.cfg b/cfg/PlayMotionModule.cfg index 0459d84ef84b6495f9cafa3e1fb57f3696d103f5..1be1b6f71a5d939b158e5ab3402b45713b7bc1d2 100755 --- a/cfg/PlayMotionModule.cfg +++ b/cfg/PlayMotionModule.cfg @@ -44,7 +44,8 @@ play_action = gen.add_group("Play motion action") gen.add("rate_hz", double_t, 0, "Gripper module rate in Hz", 1.0, 1.0, 100.0) play_action.add("action_max_retries",int_t, 0, "Maximum number of retries for the action start", 1, 1, 10) -play_action.add("feedback_watchdog_time_s",double_t, 0, "Maximum time between feedback messages", 1, 0.01, 50) +play_action.add("feedback_watchdog_time_s",double_t, 0, "Maximum time between feedback messages", 1, 0.01, 600) +play_action.add("enable_watchdog", bool_t, 0, "Enable action watchdog", True) play_action.add("timeout_s", double_t, 0, "Maximum time allowed to complete the action", 1, 0.1, 30) play_action.add("enable_timeout", bool_t, 0, "Enable action timeout", True) play_action.add("enabled", bool_t, 0, "Enable action execution", True) diff --git a/src/play_motion_module.cpp b/src/play_motion_module.cpp index 69d967600b4fb6f1cd935201c066f88d3ecfe105..003a96c6affd583a60add23e2c52552aba7619b1 100644 --- a/src/play_motion_module.cpp +++ b/src/play_motion_module.cpp @@ -104,7 +104,10 @@ void CPlayMotionModule::reconfigure_callback(play_motion_module::PlayMotionModul this->set_rate(config.rate_hz); /* motion action parameters */ this->play_motion_action.set_max_num_retries(config.action_max_retries); - this->play_motion_action.set_feedback_watchdog_time(config.feedback_watchdog_time_s); + if(config.enable_watchdog) + this->play_motion_action.enable_watchdog(config.feedback_watchdog_time_s); + else + this->play_motion_action.disable_watchdog(); if(this->config.enable_timeout) this->play_motion_action.enable_timeout(config.timeout_s); else