Skip to content

Commit ee7ebb3

Browse files
authored
SolutionMsg: always fill start_scene (moveit#175)
So far, the start_scene field of a SolutionMsg was only filled by Introspection::fillSolution(), but not yet by Task::execute(). Addendum(v4hn): The previous approach was actually reasonable too (although the scene should have been marked as `is_diff`) for solutions sent for execution, but keeping the full start_scene around can facilitate debugging from recorded data.
1 parent 4fa7066 commit ee7ebb3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/src/introspection.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ void Introspection::registerSolution(const SolutionBase& s) {
133133

134134
void Introspection::fillSolution(moveit_task_constructor_msgs::Solution& msg, const SolutionBase& s) {
135135
s.fillMessage(msg, this);
136+
s.start()->scene()->getPlanningSceneMsg(msg.start_scene);
137+
136138
msg.process_id = impl->process_id_;
137139
msg.task_id = impl->task_->id();
138-
s.start()->scene()->getPlanningSceneMsg(msg.start_scene);
139140
}
140141

141142
void Introspection::publishSolution(const SolutionBase& s) {

core/src/task.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ moveit_msgs::MoveItErrorCodes Task::execute(const SolutionBase& s) {
318318

319319
moveit_task_constructor_msgs::ExecuteTaskSolutionGoal goal;
320320
s.fillMessage(goal.solution, pimpl()->introspection_.get());
321+
s.start()->scene()->getPlanningSceneMsg(goal.solution.start_scene);
322+
321323
ac.sendGoal(goal);
322324
ac.waitForResult();
323325
return ac.getResult()->error_code;

0 commit comments

Comments
 (0)