fix(simulation): rearm rover during active offboard run
This commit is contained in:
parent
b9ce5f53a0
commit
8ace0cd102
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue