-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offboard temp cal: check topic instance #14897
Conversation
Not checking the id can lead to sensor ordering swap
I'm not sure I follow, what do you mean "instance 1 appears before the 0"? Are you saying the instance numbering of the logged topic (ulg) is inconsistent with the system? |
sensor_baro_1 = d.data | ||
print('found baro 1 data') | ||
num_baros = 2 | ||
sensor_instance = sensor_instance +1 | ||
num_baros += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might as well add sensor_baro 2. We're already carrying the parameters. https://github.com/PX4/Firmware/blob/c96b5246ffc50eeceef5aad0a31068a00f2b672b/src/modules/temperature_compensation/temp_comp_params_baro.c#L233-L319
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that in f938b17 . I followed the copy-paste pattern...
When looping through the topics:
The instance 1 of |
Right ok, so even though we're now careful to advertise the drivers consistently we still have a race condition for first publication. Removing all ordering assumptions and always referencing device id is still the way to go, but we may want to look at log changes later to remove the potential discrepancy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the script uses device id's, I don't see anything wrong per se, just the plotting that is confusing.
relates to #14776
I found out that the script was assuming that the multi topics instance are appearing in order but it isn't always the case. In my case, the instance 1 appears before the 0.


Before fix (the 2nd IMU was assumed 0)
After fix (primary is 0)