Closed bartslinger closed 6 years ago
Interesting find! Have you tried changing it and tested the results?
I got a ton of warnings like Accel TIMEOUT when running heavy calculations (opencv stuff) in another thread at prio 35. Then I changed DriverFramework priority from 10 to 97 and those warnings disappeared. On linux systems such as bebop, the priority range for SCHED_FIFO is 1 to 99. I don't know if other posix px4 systems exist with different priority ranges.
wkr_hrt
and bebop_bus_esc_main
are at prio 99. hpwork
is at prio 98. There might be more because I only checked the tasks threads.
@bartslinger Tangential question, are you running OpenCV onboard the Bebop?
@bartslinger to me it seems like it makes sense to bump the priority then.
I'll try at highest priority today SCHED_PRIORITY_MAX
, which I think it should be. Let's see what that does to hpwork
and wkr_hrt
@mhkabir Yes, I cross compiled it and linked it to px4. I'll make that available when it's ready.
I am experiencing issues on Bebop 2 because the DriverFramework priority is hard-coded to 10 (!!). Basically everything else is running at a higher priority. This is terrible because now we have IMU and MAG on the lowest priority.
https://github.com/PX4/DriverFramework/blob/master/framework/src/DriverFramework.cpp#L333
However I'm not sure what would be an appropriate value here. That's what I'd like to discuss in this issue.