Skip to content

Commit 5dd170b

Browse files
Abishalinirhaschke
authored andcommitted
Add planner info to comments (moveit#523)
1 parent 9b4c760 commit 5dd170b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/src/storage.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,13 @@ void SolutionBase::toMsg(moveit_task_constructor_msgs::msg::Solution& msg, Intro
214214
void SolutionBase::fillInfo(moveit_task_constructor_msgs::msg::SolutionInfo& info, Introspection* introspection) const {
215215
info.id = introspection ? introspection->solutionId(*this) : 0;
216216
info.cost = this->cost();
217-
info.comment = this->comment();
217+
if (!this->plannerId().empty() && !this->comment().empty()) {
218+
info.comment = this->plannerId() + " : " + this->comment();
219+
} else if (!this->plannerId().empty() && this->comment().empty()) {
220+
info.comment = "Solution generated by " + this->plannerId();
221+
} else {
222+
info.comment = this->comment();
223+
}
218224
info.planner_id = this->plannerId();
219225
const Introspection* ci = introspection;
220226
info.stage_id = ci ? ci->stageId(this->creator()) : 0;

0 commit comments

Comments
 (0)