Skip to content

Script for analysing the running tasks (`tasks.txt`) in ArduCopter

Notifications You must be signed in to change notification settings

mochex/arducopter_tasks_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Analysis for ArduCopter

This repository contains python scripts for analysing the running tasks on ArduCopter. In order to execute these scripts, the file tasks.txt and the ardupilot repository are needed. For getting the file tasks.txt, use mavproxy.py and get the file with: ftp get @SYS/tasks.txt. Also, make sure that the commit of ardupilot is the same as the one running on your flight controller.

Tools

analysis.py

It summarizes the properties of running tasks based on the file tasks.txt and their configuration which is extracted from Ardupilot code. As output, you get a file named tasks_prop.yaml if your file is named tasks.txt.

comparison.py

It is used to evaluate changes in the running tasks, e.g. due to different thread properties. It requires as input the results of analysis.py of the 2 tasks.txt to be compared. The comparison is based on checking how the stats of each task has changed. For example, if a given task has less overruns in the second tasks_prop.yaml, it is considered as an improvement. But if it has more overruns, it is considered a setback. Furthermore, if a task has more improvements than setbacks, the task execution is considered to be improved. In a similar way, if it has more setbacks, it is considered to be worsened.

How to run the scripts

  1. Get both tasks.txt to be analysed. Make sure you rename them in order to know the difference, e.g. tasks_scenario1.txt and tasks_scenario2.txt.
  2. Run the analysis for both tasks.txt files. You just need to run python analysis.py <path/to/ardupilot> <path/to/tasks_scenario1.txt>, and repeat it for tasks_scenario2.txt.
  3. Run the comparison: python comparison.py <path/to/tasks_sceneario1_prop.yaml> <path/to/tasks_sceneario2_prop.yaml>.
  4. You will see an output like this one:

Improvements 124, Setbacks 83, Improved tasks 42(53.16%), Worsened tasks 24(30.38%), Global improvements 22.78%, out of 79 tasks

If you see more improvements than setbacks, and the improved tasks are more than the worsened tasks, the results are positive. In this case, the global improvements are also going to be positive (it will be negative in case of more worsened tasks than improved tasks). Remember that the results of the comparison are considered improvements when there is a reduction of the corresponding value in the second file.

Use the option --help for more info about running the scripts.

About

Script for analysing the running tasks (`tasks.txt`) in ArduCopter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages