HI everyone, I have problem with ahrs method on LUA. In my script I need to get current pitch positon of vehicle. In Lua docs only one method that I find its ahrs:get_pitch(), but when I try to call it, it`s returns nil value.
I tried to call ahrs:healthy and ahrs:initialised, but it`s also return nil values. So, when I call any of ahrs functions, it returns nil.
I tried to call ahrs after dron arming, but that not help:
if not arming:is_armed() then
gcs:send_text(6, "Not Armed")
return update, 1000
end
if ahrs:healthy() then
gcs:send_text(6, "AHRS ready")
else
gcs:send_text(6, "AHRS not ready")
end
ahrs.pitch = math.deg(ahrs:get_pitch())
but I always have nil value on any call of ahrs
Tested all of that on SITL and Cube Orange Plus, have same resault.
Also tried to set BRD_boot_delay 15000, no help.
SCR_enable is 1
SCR_HEAP_SIZE 204800
So, what problem may be with ahrs method?
Also, may be exist some other method to get pitch current position of drone?
ahrs problem params SITL.param (24.4 KB)
1 post - 1 participant