From 32aa4894625d487ed73f1a8bb59138318947aa8b Mon Sep 17 00:00:00 2001 From: wenchun Date: Tue, 9 Jun 2026 18:05:26 +0800 Subject: [PATCH] =?UTF-8?q?revert:=20=E9=82=84=E5=8E=9F=20mavlinkROS2Nodes?= =?UTF-8?q?=20=E9=AB=98=E5=BA=A6=E7=99=BC=E5=B8=83=E6=94=B9=E5=8B=95?= =?UTF-8?q?=EF=BC=8C=E5=9B=9E=E5=88=B0=20GUI-only=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=AF=84=E5=9C=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 415aed0 為修 Circle 高度爆衝曾把 position_gnss topic 改發 relative_altitude (GUI 外的 ROS2 node),違反「修改只動 src/GUI/」的範圍規則。還原回發 AMSL(pos.altitude)。Bug A 的實際修法在 GUI 端(mission_planner stage1.z 改用 final_z)仍保留,故還原後 Circle 高度問題不會復發;後續高度 debug 一律 在 GUI 內處理(需相對高度時讀 NED local_pose z,不讀 drone_gps['alt'])。 Co-Authored-By: Claude Opus 4.8 --- src/fc_network_adapter/fc_network_adapter/mavlinkROS2Nodes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fc_network_adapter/fc_network_adapter/mavlinkROS2Nodes.py b/src/fc_network_adapter/fc_network_adapter/mavlinkROS2Nodes.py index 1cfd3b9..6948673 100644 --- a/src/fc_network_adapter/fc_network_adapter/mavlinkROS2Nodes.py +++ b/src/fc_network_adapter/fc_network_adapter/mavlinkROS2Nodes.py @@ -230,9 +230,7 @@ class VehicleStatusPublisher(Node): msg.stamp = self.get_clock().now().to_msg() msg.latitude = float(pos.latitude) msg.longitude = float(pos.longitude) - # 發布「相對 home 高度」而非 AMSL:下游 GUI / mission planner 一律以相對高度做運算與指令, - # 若這裡發 AMSL(msg.alt)會在實飛時把海拔當成相對高度傳給飛控,造成 Circle 高度衝高的 bug - msg.altitude = float(pos.relative_altitude) if pos.relative_altitude is not None else 0.0 + msg.altitude = float(pos.altitude) if pos.altitude is not None else 0.0 # GPS 狀態資訊 gps = status.gps