revert: 還原 mavlinkROS2Nodes 高度發布改動,回到 GUI-only 修改範圍

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 <noreply@anthropic.com>
wenchun 2 weeks ago
parent 415aed088a
commit 32aa489462

@ -230,9 +230,7 @@ class VehicleStatusPublisher(Node):
msg.stamp = self.get_clock().now().to_msg() msg.stamp = self.get_clock().now().to_msg()
msg.latitude = float(pos.latitude) msg.latitude = float(pos.latitude)
msg.longitude = float(pos.longitude) msg.longitude = float(pos.longitude)
# 發布「相對 home 高度」而非 AMSL下游 GUI / mission planner 一律以相對高度做運算與指令, msg.altitude = float(pos.altitude) if pos.altitude is not None else 0.0
# 若這裡發 AMSLmsg.alt會在實飛時把海拔當成相對高度傳給飛控造成 Circle 高度衝高的 bug
msg.altitude = float(pos.relative_altitude) if pos.relative_altitude is not None else 0.0
# GPS 狀態資訊 # GPS 狀態資訊
gps = status.gps gps = status.gps

Loading…
Cancel
Save