Skip to content

Commit

Permalink
Fix use-after-move
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Jul 17, 2024
1 parent b0f1561 commit b67a0ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tesseract_planning_server/src/tesseract_planning_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ void TesseractPlanningServer::onMotionPlanningCallback(
env->applyCommands(tesseract_rosutils::fromMsg(goal->request.commands));
env->setState(env_state.joints);

// Store the initial state in the response for publishing trajectories
tesseract_scene_graph::SceneState initial_state = env->getState();
tesseract_rosutils::toMsg(result->response.initial_state, initial_state.joints);

// Create solve data storage
auto data = std::make_unique<TaskComposerDataStorage>();
data->setData("planning_input", std::move(planning_input));
Expand All @@ -255,10 +259,6 @@ void TesseractPlanningServer::onMotionPlanningCallback(
if (!composite_profile_remapping.empty())
data->setData("composite_profile_remapping", composite_profile_remapping);

// Store the initial state in the response for publishing trajectories
tesseract_scene_graph::SceneState initial_state = env->getState();
tesseract_rosutils::toMsg(result->response.initial_state, initial_state.joints);

// Solve
tesseract_common::Timer timer;
timer.start();
Expand Down

0 comments on commit b67a0ab

Please sign in to comment.