From 61ee7516420c86ef85c1200a113bafe204da5958 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Mon, 15 May 2023 10:54:20 +0200 Subject: [PATCH] better logging --- src/px4_connection/src/px4_controller.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/px4_connection/src/px4_controller.cpp b/src/px4_connection/src/px4_controller.cpp index b01f7803..5ecb4813 100644 --- a/src/px4_connection/src/px4_controller.cpp +++ b/src/px4_connection/src/px4_controller.cpp @@ -161,9 +161,9 @@ 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]); + RCLCPP_INFO(this->get_logger(), "Got new velocity setpoint. %f %f %f", velocity[0], velocity[1], velocity[2]); } else if (request->control_mode == CONTROL_MODE_POSITION) { @@ -175,6 +175,7 @@ private: } last_angle = request->yaw; + RCLCPP_INFO(this->get_logger(), "Yaw: %f", last_angle); response->success = true; } }