diff --git a/cfg/PlayMotionModule.cfg b/cfg/PlayMotionModule.cfg index 67ddc2461d92ea6f4f3a2431d16dea0cd0011806..0459d84ef84b6495f9cafa3e1fb57f3696d103f5 100755 --- a/cfg/PlayMotionModule.cfg +++ b/cfg/PlayMotionModule.cfg @@ -41,11 +41,12 @@ play_action = gen.add_group("Play motion action") # Name Type Reconfiguration level Description Default Min Max #gen.add("velocity_scale_factor", double_t, 0, "Maximum velocity scale factor", 0.5, 0.0, 1.0) -gen.add("rate_hz", double_t, 0, "Gripper module rate in Hz", 1.0, 1.0, 100.0) +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("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("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("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) exit(gen.generate(PACKAGE, "PlayMotionModuleAlgorithm", "PlayMotionModule")) diff --git a/src/play_motion_module.cpp b/src/play_motion_module.cpp index 6241e1175aa8830384ff87f7ee7e6aae88d2ee8d..69d967600b4fb6f1cd935201c066f88d3ecfe105 100644 --- a/src/play_motion_module.cpp +++ b/src/play_motion_module.cpp @@ -109,6 +109,10 @@ void CPlayMotionModule::reconfigure_callback(play_motion_module::PlayMotionModul this->play_motion_action.enable_timeout(config.timeout_s); else this->play_motion_action.disable_timeout(); + if(this->config.enabled) + this->play_motion_action.enable(); + else + this->play_motion_action.disable(); this->unlock(); }