diff --git a/nav2_docking/opennav_docking/src/docking_server.cpp b/nav2_docking/opennav_docking/src/docking_server.cpp index 1cadbf3c077..07d6a017293 100644 --- a/nav2_docking/opennav_docking/src/docking_server.cpp +++ b/nav2_docking/opennav_docking/src/docking_server.cpp @@ -436,7 +436,7 @@ void DockingServer::rotateToDock(const geometry_msgs::msg::PoseStamped & dock_po } command->header.stamp = now(); command = controller_->rotateToTarget(angle_to_goal); - vel_publisher_->publish(command); + vel_publisher_->publish(std::move(command)); loop_rate.sleep(); } }