Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAVLink app: Do not rate-limit camera trigger feedback #7160

Closed
wants to merge 1 commit into from

Conversation

LorenzMeier
Copy link
Member

This is important to ensure no camera trigger messages are being dropped.

@LorenzMeier
Copy link
Member Author

CPU load on master:

 PID COMMAND                   CPU(ms) CPU(%)  USED/STACK PRIO(BASE) STATE 
   0 Idle Task                 1422607 39.042   644/  748   0 (  0)  READY 
   1 hpwork                     137033  4.113   888/ 1780 192 (192)  w:sem 
   2 lpwork                       7088  0.224   640/ 1780  50 ( 50)  READY 
   3 init                        18391  0.000  2008/ 2484 100 (100)  w:sem 
 336 top                            39  0.000  1296/ 1684 100 (100)  RUN   
  95 gps                          8035  0.224   808/ 1476 220 (220)  w:sig 
 103 dataman                       180  0.000   704/ 1180  90 ( 90)  w:sem 
 143 sensors                    167475  5.011  1336/ 1980 250 (250)  w:sem 
 145 commander                   69483  1.944  2896/ 3548 140 (140)  w:sig 
 152 px4io                      105276  3.141   976/ 1380 240 (240)  w:sem 
 165 mavlink_if0                 66952  1.944  1736/ 2436 100 (100)  w:sig 
 166 mavlink_rcv_if0              1236  0.074  1148/ 2100 175 (175)  w:sem 
 178 mavlink_if1                 48296  1.271  1712/ 2388 100 (100)  w:sig 
 179 mavlink_rcv_if1              5004  0.149  1416/ 2100 175 (175)  w:sem 
 236 commander_low_prio            120  0.000   704/ 2996  50 ( 50)  w:sem 
 217 mavlink_if2                308063  9.349  1824/ 2388 100 (100)  w:sig 
 218 mavlink_rcv_if2               511  0.074  1536/ 2100 175 (175)  w:sem 
 234 logger                      17801  0.598  1312/ 3532 250 (250)  w:sem 
 237 log_writer_file                 0  0.000   344/ 1060  60 ( 60)  w:sem 
 285 ekf2                       631821 18.922  5112/ 5780 250 (250)  w:sem 
 292 mc_att_control             154698  4.712  1256/ 1676 250 (250)  w:sem 
 297 mc_pos_control             161517  4.861  1240/ 1876 250 (250)  w:sem 
 308 navigator                    7072  0.224  1224/ 1572 105 (105)  w:sem 

Processes: 23 total, 3 running, 20 sleeping
CPU usage: 56.84% tasks, 4.11% sched, 39.04% idle
DMA Memory: 5120 total, 1536 used 1536 peak
Uptime: 3359.948s total, 1422.608s idle
nsh> free
             total       used       free    largest
Mem:        236864     206384      30480      25680

@LorenzMeier
Copy link
Member Author

With this PR:

 PID COMMAND                   CPU(ms) CPU(%)  USED/STACK PRIO(BASE) STATE 
   0 Idle Task                  270574 37.810   644/  748   0 (  0)  READY 
   1 hpwork                      28150  4.079   816/ 1780 192 (192)  w:sig 
   2 lpwork                       1658  0.199   640/ 1780  50 ( 50)  w:sig 
   3 init                         8239  0.000  2120/ 2484 100 (100)  w:sem 
 328 top                             0  0.000  1208/ 1684 100 (100)  RUN   
  95 gps                          1748  0.298  1056/ 1476 220 (220)  w:sem 
 103 dataman                       181  0.000   704/ 1180  90 ( 90)  w:sem 
 143 sensors                     34035  4.975  1328/ 1980 250 (250)  w:sem 
 145 commander                   13973  1.890  2744/ 3548 140 (140)  w:sig 
 152 px4io                       21663  3.084  1048/ 1380 240 (240)  w:sem 
 165 mavlink_if0                 13805  1.990  1736/ 2436 100 (100)  w:sig 
 166 mavlink_rcv_if0               250  0.000  1336/ 2100 175 (175)  w:sem 
 178 mavlink_if1                 10137  1.592  1712/ 2388 100 (100)  w:sig 
 179 mavlink_rcv_if1               716  0.099  1240/ 2100 175 (175)  w:sem 
 236 log_writer_file                 0  0.000   344/ 1060  60 ( 60)  w:sem 
 217 mavlink_if2                 91961 13.532  1824/ 2388 100 (100)  w:sig 
 218 mavlink_rcv_if2               104  0.000  1536/ 2100 175 (175)  w:sem 
 234 logger                       3756  0.597  1312/ 3532 250 (250)  w:sem 
 318 commander_low_prio             24  0.000   720/ 2996  50 ( 50)  w:sem 
 283 ekf2                       120364 19.004  5112/ 5780 250 (250)  w:sem 
 285 mc_att_control              31419  4.676  1256/ 1676 250 (250)  w:sem 
 292 mc_pos_control              30007  4.975  1240/ 1876 250 (250)  w:sem 
 299 navigator                    1169  0.199  1208/ 1572 105 (105)  w:sem 

Processes: 23 total, 2 running, 21 sleeping
CPU usage: 61.19% tasks, 1.00% sched, 37.81% idle
DMA Memory: 5120 total, 1536 used 1536 peak
Uptime: 684.974s total, 270.575s idle
nsh> free
             total       used       free    largest
Mem:        236864     206368      30496      25888
nsh> 

The main difference are mavlink instances #1 and #2, where #1 consumes 0.4% more CPU load and #2 4.5% more load. This is due to faster scheduling to be able to meet higher rate demands.

…arter about message scheduling

This patch should help keeping on scheduled intervals for all messages and should prevent CAMERA_TRIGGER messages from being scaled due to traffic
@LorenzMeier LorenzMeier force-pushed the pr-mavlink-output-rates branch from 41e2a38 to c4296e1 Compare June 4, 2017 10:29
@TSC21
Copy link
Member

TSC21 commented Aug 20, 2017

@LorenzMeier can you rebase this?

@LorenzMeier
Copy link
Member Author

This got superseded.

@LorenzMeier LorenzMeier deleted the pr-mavlink-output-rates branch August 20, 2017 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants