From 5878e8ab6b4b70986c50510aacded3fe08e6cca8 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Wed, 30 May 2018 21:02:03 +0200 Subject: [PATCH] correctly reset FixedState --- core/include/moveit/task_constructor/stages/fixed_state.h | 1 + core/src/stages/fixed_state.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/core/include/moveit/task_constructor/stages/fixed_state.h b/core/include/moveit/task_constructor/stages/fixed_state.h index 7e68373b..b6df85fc 100644 --- a/core/include/moveit/task_constructor/stages/fixed_state.h +++ b/core/include/moveit/task_constructor/stages/fixed_state.h @@ -49,6 +49,7 @@ public: FixedState(const std::string& name = "initial state"); void setState(const planning_scene::PlanningScenePtr& scene); + void reset() override; bool canCompute() const override; void compute() override; diff --git a/core/src/stages/fixed_state.cpp b/core/src/stages/fixed_state.cpp index 17151463..a1fa5a25 100644 --- a/core/src/stages/fixed_state.cpp +++ b/core/src/stages/fixed_state.cpp @@ -48,6 +48,12 @@ void FixedState::setState(const planning_scene::PlanningScenePtr& scene) scene_ = scene; } +void FixedState::reset() +{ + Generator::reset(); + ran_ = false; +} + bool FixedState::canCompute() const{ return !ran_ && scene_; }