Closed
Description
Bug report
Issue details
This is a HAL_BOARD_SITL bug report. The panic function within libraries/AP_Common/Location.cpp is triggered if a camera trigger is requested without the location being available.
code details
This occurs as the
ardupilot/libraries/AP_Common/Location.cpp
Line 109 in 7601c83
panic function will be raised by
AP_Camera_Backend::Write_CameraInfo
if camera trigger is requested (for example via mission planner) and location is not known yet. The unguarded call to current_loc.get_alt_cm
raises this.
fix
and
should be
if (current_loc.initialised() && !current_loc.get_alt_cm(Location::AltFrame::ABSOLUTE, altitude_cm)) {
and
if (current_loc.initialised() && !current_loc.get_alt_cm(Location::AltFrame::ABOVE_HOME, altitude_rel_cm)) {
I could send a PR if requested.
Version
master branch
4.7.0-dev
Platform
[?] All
[ ] AntennaTracker
[X] Copter
[ ] Plane
[ ] Rover
[ ] Submarine
Airframe type
irrelevant
Hardware type
HAL_BOARD_SITL
Logs
#5 0x000055ebb20e1175 in AP_HAL::panic (errormsg=0x55ebb2231600 "Should not be called on invalid location: Location cannot be (0, 0, 0)") at ../../libraries/AP_HAL_SITL/system.cpp:51
ap = {{gp_offset = 8, fp_offset = 48, overflow_arg_area = 0x7ffcabb23be0, reg_save_area = 0x7ffcabb23b20}}
Metadata
Metadata
Assignees
Labels
No labels