fix(simulation): rearm rover during active offboard run

This commit is contained in:
DCCONSTRUCTIONS 2026-07-24 22:31:43 +03:00
parent b9ce5f53a0
commit 8ace0cd102
1 changed files with 2 additions and 1 deletions

View File

@ -240,6 +240,7 @@ class Ros2Px4AckermannControl:
speed_mps = self._latest_speed_mps
steering_normalized = self._latest_steering_normalized
disarm_requested = self._disarm_requested
control_confirmed = self._armed and self._offboard
timestamp_us = int(node.get_clock().now().nanoseconds // 1_000)
self._publish_setpoint(
messages,
@ -255,7 +256,7 @@ class Ros2Px4AckermannControl:
heartbeat_count += 1
if (
heartbeat_count >= OFFBOARD_WARMUP_HEARTBEATS
and not self._control_ready.is_set()
and not control_confirmed
and now_monotonic - last_mode_request_monotonic >= 1.0
):
self._publish_vehicle_command(