diff --git a/astrobee/survey_manager/survey_planner/include/survey_planner/isaac_action_node.h b/astrobee/survey_manager/survey_planner/include/survey_planner/isaac_action_node.h index bf28a343..025b9ae2 100644 --- a/astrobee/survey_manager/survey_planner/include/survey_planner/isaac_action_node.h +++ b/astrobee/survey_manager/survey_planner/include/survey_planner/isaac_action_node.h @@ -29,6 +29,7 @@ namespace plansys2_actions { class IsaacAction : public plansys2::ActionExecutorClient { public: IsaacAction(ros::NodeHandle nh, const std::string& action, const std::chrono::nanoseconds& rate); + ~IsaacAction(); protected: void do_work(); diff --git a/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp b/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp index a6895fe8..686fcd7b 100644 --- a/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp +++ b/astrobee/survey_manager/survey_planner/src/isaac_action_node.cpp @@ -103,6 +103,13 @@ void IsaacAction::do_work() { } } } + +IsaacAction::~IsaacAction() { + if (pid_ != 0) { + // Kill the child process + kill(pid_, SIGKILL); + } +} } // namespace plansys2_actions