mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
Add planner info to comments (#523)
This commit is contained in:
parent
32604ad83d
commit
57e8490fdf
@ -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 {
|
void SolutionBase::fillInfo(moveit_task_constructor_msgs::msg::SolutionInfo& info, Introspection* introspection) const {
|
||||||
info.id = introspection ? introspection->solutionId(*this) : 0;
|
info.id = introspection ? introspection->solutionId(*this) : 0;
|
||||||
info.cost = this->cost();
|
info.cost = this->cost();
|
||||||
|
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.comment = this->comment();
|
||||||
|
}
|
||||||
info.planner_id = this->plannerId();
|
info.planner_id = this->plannerId();
|
||||||
const Introspection* ci = introspection;
|
const Introspection* ci = introspection;
|
||||||
info.stage_id = ci ? ci->stageId(this->creator()) : 0;
|
info.stage_id = ci ? ci->stageId(this->creator()) : 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user