Assert failed at radiolink.c:164
Posted: Tue Apr 20, 2021 9:54 am
Hello,
I am currently using the crazyflie for my work on computationally efficient Moving Horizon Estimation. For this purpose, I have implemented my algorithm alongside the other estimators and connected it within the rest of the firmware following the same approach as the EKF. During debugging and testing on the drone, I regularly encounter problems with the radiolink, specifically a failed assert at .//src/hal/src/radiolink.c:164. Despite my best efforts I can't seem to pinpoint the source of the issue, it only appears sporadically after 2-30s of the code running fine, and it sometimes disappears again in new iterations of my code.
From my understanding, the assert fails if the 'crtpPacketDelivery' queue is full, so I tried to double its size (5->10) with only limited success (same file, line 49).
My suspicion is, that the queue fills up due to timing problems when my code runs for a bit longer at a time, but I was expecting freeRTOS to handle this based on task priorities. However, it doesn't seem to be a case of overloading the system (Task dumps show my estimator task at 5-10% load, leaving over 60% idle time, which is similar to the EKF).
Does anyone have an idea what might be causing the problem, and what could be done to solve it?
I am currently using the crazyflie for my work on computationally efficient Moving Horizon Estimation. For this purpose, I have implemented my algorithm alongside the other estimators and connected it within the rest of the firmware following the same approach as the EKF. During debugging and testing on the drone, I regularly encounter problems with the radiolink, specifically a failed assert at .//src/hal/src/radiolink.c:164. Despite my best efforts I can't seem to pinpoint the source of the issue, it only appears sporadically after 2-30s of the code running fine, and it sometimes disappears again in new iterations of my code.
From my understanding, the assert fails if the 'crtpPacketDelivery' queue is full, so I tried to double its size (5->10) with only limited success (same file, line 49).
My suspicion is, that the queue fills up due to timing problems when my code runs for a bit longer at a time, but I was expecting freeRTOS to handle this based on task priorities. However, it doesn't seem to be a case of overloading the system (Task dumps show my estimator task at 5-10% load, leaving over 60% idle time, which is similar to the EKF).
Does anyone have an idea what might be causing the problem, and what could be done to solve it?