|
1 | | - |
| 1 | +mavctl-python |
2 | 2 |
|
3 | | -# Overview [](https://github.com/nektos/act/actions) [](https://goreportcard.com/report/github.com/nektos/act) [](https://github.com/jonico/awesome-runners) |
| 3 | +An Open Source Library for Autonomous Drone Navigation. |
| 4 | +Things to be Familiar With |
4 | 5 |
|
5 | | -> "Think globally, `act` locally" |
| 6 | +Before diving into mavctl, it is recommended that you read up on or familiarize yourself with the following so that you have an easier time working on mavctl |
6 | 7 |
|
7 | | -Run your [GitHub Actions](https://developer.github.com/actions/) locally! Why would you want to do this? Two reasons: |
| 8 | + MAVLink (https://mavlink.io/) Take a look through introduction just to get an idea of how the MAVLink protocol works |
8 | 9 |
|
9 | | -- **Fast Feedback** - Rather than having to commit/push every time you want to test out the changes you are making to your `.github/workflows/` files (or for any changes to embedded GitHub actions), you can use `act` to run the actions locally. The [environment variables](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables) and [filesystem](https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#filesystems-on-github-hosted-runners) are all configured to match what GitHub provides. |
10 | | -- **Local Task Runner** - I love [make](<https://en.wikipedia.org/wiki/Make_(software)>). However, I also hate repeating myself. With `act`, you can use the GitHub Actions defined in your `.github/workflows/` to replace your `Makefile`! |
| 10 | + Shepard (https://github.com/uaarg/shepard) Take a look through here (https://github.com/uaarg/shepard/blob/main/src/modules/autopilot/navigator.py) to get an idea of what the navigation functions should sort of look like Another thing to take a look at is the flight tests scripts as well (https://github.com/uaarg/shepard/blob/main/src/modules/autopilot/navigator.py) |
11 | 11 |
|
12 | | -> [!TIP] |
13 | | -> **Now Manage and Run Act Directly From VS Code!**<br/> |
14 | | -> Check out the [GitHub Local Actions](https://sanjulaganepola.github.io/github-local-actions-docs/) Visual Studio Code extension which allows you to leverage the power of `act` to run and test workflows locally without leaving your editor. |
| 12 | + DroneKit (OPTIONAL) (https://github.com/dronekit/dronekit-python) While this is optional, a lot of things from DroneKit are borrowed, specifically the things that DroneKit does well. Overall, mavctl-python is similar to dronekit but it is revamped and is meant to replace DroneKit for all of its functionality. Over time we will reach a point where we will have exceeded dronekit but that time has not been reached just yet. |
15 | 13 |
|
16 | | -# How Does It Work? |
| 14 | +Contribution Guidelines |
17 | 15 |
|
18 | | -When you run `act` it reads in your GitHub Actions from `.github/workflows/` and determines the set of actions that need to be run. It uses the Docker API to either pull or build the necessary images, as defined in your workflow files and finally determines the execution path based on the dependencies that were defined. Once it has the execution path, it then uses the Docker API to run containers for each action based on the images prepared earlier. The [environment variables](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables) and [filesystem](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems) are all configured to match what GitHub provides. |
| 16 | +Push all of your changes to a seperate branch and make a pull request if you would like to merge to main |
19 | 17 |
|
20 | | -Let's see it in action with a [sample repo](https://github.com/cplee/github-actions-demo)! |
| 18 | +IMPORTANT: FOLLOW THE STRUCTURE. It is very important for you to follow the structure that mavctl-python follows in terms of its operation. |
21 | 19 |
|
22 | | - |
| 20 | +mavctl-python works as follows: |
23 | 21 |
|
24 | | -# Act User Guide |
| 22 | +MAVLink connection is created and a PyMAVLink object is passed to the Navigator class. In the Navigator class, there are methods which conduct the drone navigation (ex. move the drone 1m North) |
25 | 23 |
|
26 | | -Please look at the [act user guide](https://nektosact.com) for more documentation. |
| 24 | +More advanced maneuvers should be located in their own files, but should NOT be in their own respective class. Instead, you can pass the Navigator class object into these advanced maneuver functions. |
27 | 25 |
|
28 | | -# Support |
| 26 | +The structure of that would look as follows: |
29 | 27 |
|
30 | | -Need help? Ask in [discussions](https://github.com/nektos/act/discussions)! |
| 28 | +import advanced |
31 | 29 |
|
32 | | -# Contributing |
| 30 | +master = connect() |
| 31 | +nav = Navigator() |
33 | 32 |
|
34 | | -Want to contribute to act? Awesome! Check out the [contributing guidelines](CONTRIBUTING.md) to get involved. |
| 33 | +advanced_maneuver = advancedManeuver(nav) |
35 | 34 |
|
36 | | -## Manually building from source |
37 | | - |
38 | | -- Install Go tools 1.20+ - (<https://golang.org/doc/install>) |
39 | | -- Clone this repo `git clone git@github.com:nektos/act.git` |
40 | | -- Run unit tests with `make test` |
41 | | -- Build and install: `make install` |
| 35 | +advanced would be a file named advanced.py and advancedManeuver() would be the advanced maneuver method in question. |
0 commit comments