From 5afec281a268044e82323467136091364edae697 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Mon, 15 May 2023 11:10:19 +0200 Subject: [PATCH] try continuous sending of setpoints --- src/px4_connection/src/px4_controller.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/px4_connection/src/px4_controller.cpp b/src/px4_connection/src/px4_controller.cpp index 9f156162..689035a5 100644 --- a/src/px4_connection/src/px4_controller.cpp +++ b/src/px4_connection/src/px4_controller.cpp @@ -337,21 +337,21 @@ private: } else { - if (!new_setpoint) - { - return; - } + // if (!new_setpoint) + // { + // return; + // } if (current_control_mode == CONTROL_MODE_VELOCITY) { - RCLCPP_INFO(this->get_logger(), "Sending velocity setpoint"); + RCLCPP_INFO(this->get_logger(), "velocity %f %f %f", velocity[0], velocity[1], velocity[2]); send_velocity_setpoint(); } else if (current_control_mode == CONTROL_MODE_POSITION) { - RCLCPP_INFO(this->get_logger(), "Sending position setpoint"); + RCLCPP_INFO(this->get_logger(), "position %f %f %f", position[0], position[1], position[2]); send_position_setpoint(); } - new_setpoint = false; + // new_setpoint = false; } } }