From dc5138cb8f2c0284059af7fbcaed3d5e63e0845d Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Thu, 25 May 2023 14:19:51 +0200 Subject: [PATCH] change px4controller add velocity to set velocity --- src/px4_connection/src/px4_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/px4_connection/src/px4_controller.cpp b/src/px4_connection/src/px4_controller.cpp index f1cca593..e7a428d1 100644 --- a/src/px4_connection/src/px4_controller.cpp +++ b/src/px4_connection/src/px4_controller.cpp @@ -189,7 +189,7 @@ private: { for (int i = 0; i < 3; i++) { - velocity[i] += request->values[i]; + velocity[i] = request->values[i]; } RCLCPP_INFO(this->get_logger(), "Got new velocity setpoint. %f %f %f", velocity[0], velocity[1], velocity[2]); }