From c8a61cac401d879b503f1ae0326c1549c6606480 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Fri, 28 Apr 2023 17:29:35 +0200 Subject: [PATCH] change name of quaternion array --- src/px4_connection/src/px4_controller.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/px4_connection/src/px4_controller.cpp b/src/px4_connection/src/px4_controller.cpp index 4100e687..5fd83dcf 100644 --- a/src/px4_connection/src/px4_controller.cpp +++ b/src/px4_connection/src/px4_controller.cpp @@ -76,14 +76,14 @@ private: msg.thrust_body[1] = 0; // east msg.thrust_body[2] = 0; // down - std::array array = {0, 0, 0, 0}; - calculate_quaternion(array, degrees_to_radians(270), 0, 0); + std::array q = {0, 0, 0, 0}; + calculate_quaternion(q, degrees_to_radians(270), 0, 0); } - msg.q_d[0] = array[0]; - msg.q_d[1] = array[1]; - msg.q_d[2] = array[2]; - msg.q_d[3] = array[3]; + msg.q_d[0] = q[0]; + msg.q_d[1] = q[1]; + msg.q_d[2] = q[2]; + msg.q_d[3] = q[3]; msg.timestamp = this->get_clock()->now().nanoseconds() / 1000; vehicle_setpoint_publisher_->publish(msg);