From b3e2158250c6d4f043fcb4c60b76b6f0556e5183 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Mon, 22 Jul 2019 15:09:27 +0300 Subject: [PATCH] simple_offboard: quick fix for /navigate_global sometimes not working --- clever/src/simple_offboard.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clever/src/simple_offboard.cpp b/clever/src/simple_offboard.cpp index 4c635394..744c542c 100644 --- a/clever/src/simple_offboard.cpp +++ b/clever/src/simple_offboard.cpp @@ -543,7 +543,9 @@ bool serve(enum setpoint_type_t sp_type, float x, float y, float z, float vx, fl if (sp_type == NAVIGATE_GLOBAL) { // Calculate x and from lat and lot in request's frame - auto xy_in_req_frame = tf_buffer.transform(globalToLocal(lat, lon), frame_id); + auto pose_local = globalToLocal(lat, lon); + pose_local.header.stamp = stamp; // TODO: fix + auto xy_in_req_frame = tf_buffer.transform(pose_local, frame_id); x = xy_in_req_frame.pose.position.x; y = xy_in_req_frame.pose.position.y; }