Skip to content

Conversation

bresch
Copy link
Member

@bresch bresch commented Mar 3, 2025

Solved Problem

readAndAddSubscription uses nextDataMessage to find the first corresponding data and nextDataMessage calls readAndAddSubscription when it finds a new message definition.
This works but I don't think the recursion was done by design...

Solution

Sequentially add and setup each subscription without recursion.

The check for msg_type == (int)ULogMessageType::ADD_LOGGED_MSG also helps when some other messages exist at the same time, leading to strange output:

WARN  [replay] Topic @� not found internally. Will ignore it
WARN  [replay] Topic @� not found internally. Will ignore it
WARN  [replay] Topic @� not found internally. Will ignore it
WARN  [replay] Topic A� not found internally. Will ignore it
WARN  [replay] Topic <� not found internally. Will ignore it
WARN  [replay] Topic Q� not found internally. Will ignore it
WARN  [replay] Topic B� not found internally. Will ignore it

Test coverage

Tested on a SITL log and a real flight from 1.16 (https://review.px4.io/plot_app?log=8863bef0-17e4-4315-b386-e1818d7d24f8)

readAndAddSubscription uses nextDataMessage to find the first
corresponding data and nextDataMessage calls readAndAddSubscription
when it finds a new message definition.
@bresch bresch added the EKF2 label Mar 3, 2025
@bresch bresch requested a review from dagar March 3, 2025 14:13
@bresch bresch self-assigned this Mar 3, 2025
@dagar
Copy link
Member

dagar commented Mar 4, 2025

We should really get some basic replay testing in place. It could be as simply as running a SITL test, replaying, and performing a basic comparison.

@dagar dagar merged commit 71d514d into main Mar 4, 2025
62 checks passed
@dagar dagar deleted the pr-replay_sub_non_recursive branch March 4, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants