From a15204b40b799aead184bf5f687c4e57d163560b Mon Sep 17 00:00:00 2001 From: v4hn Date: Mon, 29 Jun 2020 22:24:35 +0200 Subject: [PATCH] allow wrappers to use CostTerm --- core/include/moveit/task_constructor/container.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/include/moveit/task_constructor/container.h b/core/include/moveit/task_constructor/container.h index 8aa557a9..f1767f98 100644 --- a/core/include/moveit/task_constructor/container.h +++ b/core/include/moveit/task_constructor/container.h @@ -81,7 +81,7 @@ public: protected: ContainerBase(ContainerBasePrivate* impl); -private: + /// most containers should only use setCostTransform and leave the costs to their children using Stage::setCostTerm; }; std::ostream& operator<<(std::ostream& os, const ContainerBase& stage); @@ -227,6 +227,9 @@ public: bool canCompute() const override; void compute() override; + // Wrappers sometimes do the real work (e.g., IK), so they can specify costs + using Stage::setCostTerm; + protected: WrapperBase(WrapperBasePrivate* impl, Stage::pointer&& child = Stage::pointer()); };