Skip to content

AP_Camera: avoid SITL panic if pic taken with no pos estimate - #29558

Merged
peterbarker merged 1 commit into
ArduPilot:masterfrom
rmackay9:camera-nopos-sitl
Mar 18, 2025
Merged

AP_Camera: avoid SITL panic if pic taken with no pos estimate#29558
peterbarker merged 1 commit into
ArduPilot:masterfrom
rmackay9:camera-nopos-sitl

Conversation

@rmackay9

Copy link
Copy Markdown
Contributor

This resolves issue #29530 by checking that the current_loc has been initialised before attempting to get the altitude from it.

This fix is thanks to @blaab2 and the commit is co-authored with him, thanks!

I've lightly tested this in SITL by performing a before/after test to confirm the issue occurs before this fix and does not afterwards.

BTW, the issue can be reproduced in SITL by doing this:

  1. rm eeprom.bin file
  2. start SITL
  3. param set LOG_DISARMED 1
  4. param set GPS1_TYPE 0
  5. restart SITL
  6. right-mouse-button click on MP's map and select, "Trigger Camera NOW"

Below is a screenshot of what appears in the LOGS which is a mostly zero message
image

Co-authored-by: Daniel Ossig <ossig@tb-copters.de>

@peterbarker peterbarker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@peterbarker
peterbarker merged commit bcc7886 into ArduPilot:master Mar 18, 2025
@rmackay9 rmackay9 removed this from 4.6 Backports Mar 18, 2025
@rmackay9
rmackay9 deleted the camera-nopos-sitl branch March 18, 2025 23:16
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