Skip to content
Snippets Groups Projects
Commit 263652c8 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added a boolean to enable/disable the watchdog in the actions.

Added this boolean in the configuration files.
Extended the maximum watchdog time to 10 minutes.
parent f8d4cca9
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment