From a0ff62d63150c1f1408e54cd3d29fa37c2a1d560 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Mon, 17 Apr 2023 15:35:40 +0200 Subject: [PATCH] add anchor data printing --- src/beacon_positioning/src/tracker_position.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/beacon_positioning/src/tracker_position.cpp b/src/beacon_positioning/src/tracker_position.cpp index 4c7ef7b3..8c495989 100644 --- a/src/beacon_positioning/src/tracker_position.cpp +++ b/src/beacon_positioning/src/tracker_position.cpp @@ -116,9 +116,9 @@ int main(int argc, char **argv) if (tracker_msg.is_valid_position) { RCLCPP_INFO(node->get_logger(), "x = %f, y = %f, z = %f", tracker_msg.tracker_position_xyz.at(0), tracker_msg.tracker_position_xyz.at(1), tracker_msg.tracker_position_xyz.at(2)); - for (const &anchor_data_t : tracker_msg.anchors_data) + for (const anchor_data_t &anchor : tracker_msg.anchors_data) { - RCLCPP_INFO(node->get_logger(), "anchor number= %d, distance = %f, x = %f, y = %f, z = %f", anchor_data_t->number, anchor_data_t->distance, anchor_data_t->pos_x, anchor_data_t->pos_y, anchor_data_t->pos_z); + RCLCPP_INFO(node->get_logger(), "anchor number= %d, distance = %f, x = %f, y = %f, z = %f", anchor->number, anchor->distance, anchor->pos_x, anchor->pos_y, anchor->pos_z); } RCLCPP_INFO(node->get_logger(), ""); auto message = std_msgs::msg::String();