diff --git a/nexus_motion_planner/src/motion_plan_cache.cpp b/nexus_motion_planner/src/motion_plan_cache.cpp index e412812..3541f9c 100644 --- a/nexus_motion_planner/src/motion_plan_cache.cpp +++ b/nexus_motion_planner/src/motion_plan_cache.cpp @@ -945,8 +945,8 @@ MotionPlanCache::construct_get_cartesian_plan_request( moveit_msgs::msg::MotionPlanRequest tmp; move_group.constructMotionPlanRequest(tmp); - out.start_state = tmp.start_state; - out.group_name = tmp.group_name; + out.start_state = std::move(tmp.start_state); + out.group_name = std::move(tmp.group_name); out.max_velocity_scaling_factor = tmp.max_velocity_scaling_factor; out.max_acceleration_scaling_factor = tmp.max_acceleration_scaling_factor; diff --git a/nexus_motion_planner/src/motion_planner_server.cpp b/nexus_motion_planner/src/motion_planner_server.cpp index 055aae3..58d9208 100644 --- a/nexus_motion_planner/src/motion_planner_server.cpp +++ b/nexus_motion_planner/src/motion_planner_server.cpp @@ -695,8 +695,8 @@ void MotionPlannerServer::plan_with_move_group( } } - res->result.trajectory_start = - std::move(cartesian_plan_req_msg.start_state); + // Do NOT move this. We use the cartesian_plan_req_msg later. + res->result.trajectory_start = cartesian_plan_req_msg.start_state; res->result.trajectory = std::move(cartesian_plan); if (res->result.error_code.val !=