From f356f45c26765d00cbec69f0c70025ea0fbedbef Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Thu, 25 May 2023 12:53:03 +0200 Subject: [PATCH] add up down handling --- src/drone_controls/src/PositionChanger.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drone_controls/src/PositionChanger.cpp b/src/drone_controls/src/PositionChanger.cpp index 36ffc25a..30051b50 100644 --- a/src/drone_controls/src/PositionChanger.cpp +++ b/src/drone_controls/src/PositionChanger.cpp @@ -179,6 +179,7 @@ public: return; } this->current_yaw += request->angle * (M_PI / 180.0); // get the angle in radians + this->current_speed_z = request->up_down; get_x_y_with_rotation(request->front_back, request->left_right, this->current_yaw, &this->current_speed_x, &this->current_speed_y); RCLCPP_INFO(this->get_logger(), "Calculated speed x: %f, y: %f", this->current_speed_x, this->current_speed_y); send_trajectory_message();