From ce89e730fa98a30e8f88914d8f12ef7c5a239884 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Tue, 2 May 2023 11:40:15 +0200 Subject: [PATCH] change to attitude setpoints --- src/px4_connection/src/heartbeat.cpp | 4 ++-- src/px4_connection/src/px4_controller.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/px4_connection/src/heartbeat.cpp b/src/px4_connection/src/heartbeat.cpp index 7f6459d2..52f6f87d 100644 --- a/src/px4_connection/src/heartbeat.cpp +++ b/src/px4_connection/src/heartbeat.cpp @@ -41,9 +41,9 @@ private: // set message to enable attitude auto msg = px4_msgs::msg::OffboardControlMode(); msg.position = false; - msg.velocity = true; + msg.velocity = false; msg.acceleration = false; - msg.attitude = false; + msg.attitude = true; msg.body_rate = false; msg.actuator = false; diff --git a/src/px4_connection/src/px4_controller.cpp b/src/px4_connection/src/px4_controller.cpp index 0b6b7c07..efa818ab 100644 --- a/src/px4_connection/src/px4_controller.cpp +++ b/src/px4_connection/src/px4_controller.cpp @@ -200,7 +200,7 @@ private: flying = true; } - send_trajectory_setpoint(); + send_attitude_setpoint(); } /**