From dfe746b9bb56b0044618cb06db242ac6ca4f82e4 Mon Sep 17 00:00:00 2001 From: v4hn Date: Tue, 5 Oct 2021 09:49:47 +0200 Subject: [PATCH] FixedState: add optional scene in constructor --- core/include/moveit/task_constructor/stages/fixed_state.h | 2 +- core/src/stages/fixed_state.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/include/moveit/task_constructor/stages/fixed_state.h b/core/include/moveit/task_constructor/stages/fixed_state.h index 59a434cb..2ace2726 100644 --- a/core/include/moveit/task_constructor/stages/fixed_state.h +++ b/core/include/moveit/task_constructor/stages/fixed_state.h @@ -48,7 +48,7 @@ namespace stages { class FixedState : public Generator { public: - FixedState(const std::string& name = "initial state"); + FixedState(const std::string& name = "initial state", planning_scene::PlanningScenePtr = nullptr); void setState(const planning_scene::PlanningScenePtr& scene); void reset() override; diff --git a/core/src/stages/fixed_state.cpp b/core/src/stages/fixed_state.cpp index fddc9e4d..71ad60ad 100644 --- a/core/src/stages/fixed_state.cpp +++ b/core/src/stages/fixed_state.cpp @@ -43,7 +43,8 @@ namespace moveit { namespace task_constructor { namespace stages { -FixedState::FixedState(const std::string& name) : Generator(name) { +FixedState::FixedState(const std::string& name, planning_scene::PlanningScenePtr scene) + : Generator(name), scene_(scene) { setCostTerm(std::make_unique(0.0)); }