Skip to content
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

Merged
merged 2 commits into from
May 14, 2020

Conversation

bresch
Copy link
Member

@bresch bresch commented May 13, 2020

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)
DeepinScreenshot_select-area_20200513132302
After fix (primary is 0)
DeepinScreenshot_select-area_20200513132309

Not checking the id can lead to sensor ordering swap
@bresch bresch requested review from bkueng and dagar May 13, 2020 11:30
@bresch bresch self-assigned this May 13, 2020
@bresch bresch added the bug label May 13, 2020
@dagar
Copy link
Member

dagar commented May 13, 2020

In my case, the instance 1 appears before the 0.
Before fix (the 2nd IMU was assumed 0)

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?

@dagar dagar added this to the Release v1.11.0 milestone May 13, 2020
sensor_baro_1 = d.data
print('found baro 1 data')
num_baros = 2
sensor_instance = sensor_instance +1
num_baros += 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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...

@bresch
Copy link
Member Author

bresch commented May 13, 2020

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?

When looping through the topics:

for d in data:
    if d.name == 'sensor_accel':

The instance 1 of sensor_accel appeared before the instance 0

@dagar
Copy link
Member

dagar commented May 13, 2020

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?

When looping through the topics:

for d in data:
    if d.name == 'sensor_accel':

The instance 1 of sensor_accel appeared before the instance 0

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.

@bresch bresch requested a review from dagar May 13, 2020 15:57
Copy link
Member

@bkueng bkueng left a 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.

@bkueng bkueng merged commit 76de299 into master May 14, 2020
@bkueng bkueng deleted the pr-offboard-cal-ordering-upstream branch May 14, 2020 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants