mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 00:30:50 +08:00
fix(ekf2): stop publishing a placeholder attitude in replay
Until the attitude became valid, replay mode published a zero-filled vehicle_attitude carrying a null quaternion, so a replayed log opened with samples a reader has to know to discard. Assisted-by: Claude:claude-opus-5[1m] Signed-off-by: bresch <brescianimathieu@gmail.com>
This commit is contained in:
1 parent
7526943204
commit
8ee00cc618
1 file changed
-6
@@ -1199,12 +1199,6 @@ void EKF2::PublishAttitude(const hrt_abstime ×tamp)
|
||||
_ekf.get_quat_reset(&att.delta_q_reset[0], &att.quat_reset_counter);
|
||||
att.timestamp = _replay_mode ? timestamp : hrt_absolute_time();
|
||||
_attitude_pub.publish(att);
|
||||
|
||||
} else if (_replay_mode) {
|
||||
// in replay mode we have to tell the replay module not to wait for an update
|
||||
// we do this by publishing an attitude with zero timestamp
|
||||
vehicle_attitude_s att{};
|
||||
_attitude_pub.publish(att);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user