Update Gazebo, add ROS bridging, and implement controller warmup.

This commit is contained in:
2026-01-02 07:22:44 +00:00
parent 9450f286a1
commit 72f85c37a5
5 changed files with 54 additions and 35 deletions

View File

@@ -78,6 +78,7 @@ class DroneController(Node):
self._latest_telemetry = json.loads(msg.data)
if not self._telemetry_received:
self._telemetry_received = True
self._warmup_count = 0
self.get_logger().info('First telemetry received!')
except json.JSONDecodeError as e:
self.get_logger().warning(f'Failed to parse telemetry: {e}')
@@ -95,7 +96,14 @@ class DroneController(Node):
if self._landing_complete:
return
if self._check_landing_complete():
# Warmup period - wait for stable telemetry before checking landing
if not hasattr(self, '_warmup_count'):
self._warmup_count = 0
self._warmup_count += 1
if self._warmup_count < 100: # Wait ~2 seconds at 50Hz
# Still fly with controller, just don't check for landing yet
pass
elif self._check_landing_complete():
self._landing_complete = True
self.get_logger().info('=' * 50)
self.get_logger().info('LANDING COMPLETE!')