PX4-Autopilot: Navigator running erratic or very slow
Describe the bug
We had a flight where the vehicle_status.nav_state
was set to NAVIGATION_STATE_AUTO_RTL
for about 0.6 seconds and no message or triplet from navigator was published, as if it was not running.
In the logfile below there are times where RTL should have been engaged by navigator because the nav state was set:
- 279 s / 7.02 --> No reaction from navigator
- 280.5 s --> RTL actions were taken again
- 284.5 s --> RTL actions were taken again
To Reproduce Not sure.
Expected behavior RTL should have been initiated.
Log Files and Screenshots https://logs.px4.io/plot_app?log=7c4e2956-6ab5-409f-a2ac-0b908652a1de
Additional context Navigator is polling on local_position and there are regular updates of this topic.
We need to investigate the effects of accessing the SD card in some of the navigator modes when not inactive. E.g. Mission and Rtl modes check mission items respective rally points even if not active! Also, we check for geofences set in every iteration.
FYI @MaEtUgR
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 1
- Comments: 24 (22 by maintainers)
It’s both. For RTL we can store all the safe points in a small array. In geofence (IIRC) the polygon is already stored, but dataman is still checked constantly for an update. This is the part we get rid of with something similar to ORB_ID(mission) (https://github.com/PX4/Firmware/blob/master/msg/mission.msg). The mission message could turn into a more general dataman message that includes info about all the dataman entries, or we could add separate messages for each type (safe points, fence, waypoints).
Dataman is already like a poor man’s async. Caching the first entry (where safe points and geofence store the number of items) might be a quick way to eliminate a lot of the disk reads (similar to the orb idea).
not sure if this info helps: we also have large delays with a merge that is about 3/4 years behind current master. We have logs where there is more than a second delay between vehicle_status and triplet message.
This didn’t age well…
I’ll be taking at look at as time allows within the next few weeks to see if any changes on master have fixed this issue since it was first noted here. Hopefully it’s fixed 🤞🏻; I’ll post again if not
@julianoes yes we should look into this. Let’s though first get in https://github.com/PX4/Firmware/pull/13320 . It’s mainly about enabling the rally points also in other than RTL_TYPE = 3 mode. Note that the flight with which we had the issue was actually already with this PR.