From 3f2d24eeb3befb7c88c6722daa196589b565e607 Mon Sep 17 00:00:00 2001 From: Abishalini Sivaraman Date: Tue, 16 Jan 2024 02:13:01 -0700 Subject: [PATCH] Add planner info to comments (#523) --- core/src/storage.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/storage.cpp b/core/src/storage.cpp index f08859baf..c01c8a3b4 100644 --- a/core/src/storage.cpp +++ b/core/src/storage.cpp @@ -214,7 +214,13 @@ void SolutionBase::toMsg(moveit_task_constructor_msgs::msg::Solution& msg, Intro void SolutionBase::fillInfo(moveit_task_constructor_msgs::msg::SolutionInfo& info, Introspection* introspection) const { info.id = introspection ? introspection->solutionId(*this) : 0; info.cost = this->cost(); - info.comment = this->comment(); + if (!this->plannerId().empty() && !this->comment().empty()) { + info.comment = this->plannerId() + " : " + this->comment(); + } else if (!this->plannerId().empty() && this->comment().empty()) { + info.comment = "Solution generated by " + this->plannerId(); + } else { + info.comment = this->comment(); + } info.planner_id = this->plannerId(); const Introspection* ci = introspection; info.stage_id = ci ? ci->stageId(this->creator()) : 0;