diff --git a/core/include/moveit/task_constructor/storage.h b/core/include/moveit/task_constructor/storage.h index fa534c00..fd709e4a 100644 --- a/core/include/moveit/task_constructor/storage.h +++ b/core/include/moveit/task_constructor/storage.h @@ -135,6 +135,8 @@ private: Interface* owner_ = nullptr; // allow update of priority }; +std::ostream& operator<<(std::ostream& os, const InterfaceState::Priority& p); + /** Interface provides a cost-sorted list of InterfaceStates available as input for a stage. */ class Interface : public ordered { diff --git a/core/src/storage.cpp b/core/src/storage.cpp index 4119094a..93a49ded 100644 --- a/core/src/storage.cpp +++ b/core/src/storage.cpp @@ -84,6 +84,10 @@ bool InterfaceState::Priority::operator<(const InterfaceState::Priority& other) return this->depth() > other.depth(); } +std::ostream& operator<<(std::ostream& os, const InterfaceState::Priority& p) { + return os << "[depth: " << p.depth() << ", cost: " << p.cost() << "]"; +} + Interface::Interface(const Interface::NotifyFunction& notify) : notify_(notify) {} // Announce a new InterfaceState