Giter Club home page Giter Club logo

offboard-commands's Introduction

Offboard-Commands

A library of common functions implemented using offboard commands. For use in future competitions.

Table of contents

Installations

Note: It is recommended that you develop for this repository on Ubuntu 22.xx . All steps from this point on will assume you are on Ubuntu.

This guide will walk you through the process of getting set up with the repo and the tools you will need for development.

Git

Make sure you have git installed with git --version. If you do not, you can install it with sudo apt-get install git.

GitHub Credential Manager

GitHub handles credentials in a way that can be confusing to use at the command line. This can be remedied by using GitHub CLI. GitHub CLI will store your Git credentials for HTTPS Git operations.

First, install curl with sudo apt-get install curl.

Then, run the command (yes this is one command):

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y

Run the command gh auth login and follow the prompts. For options, choose GitHub.com, HTTPS, Yes, Login with a web browser. Authorize the session in the web browser and your GitHub credentials will be saved.

Python and Pip

Ubuntu 22 should come preinstalled with Python 3.10.4 . Check with python3 --version.

You will need to install pip with sudo apt-get install python3-pip. Pip is used for managing Python packages.

Getting the Repo

Go to your documents folder and clone the repo with git clone https://github.com/MissouriMRR/Offboard-Commands.git

Pre-commit

Pre-commit is a git hook that will check your code to make sure it is up to our standards before you make a commit. It is required that your code passes our pre-commit checks to be merged into the develop branch. That being said, when working on your own branch, you can add the --no-verify flag to your git commit command in order to bypass pre-commit. Just make sure you successfully run pre-commit before you submit a pull request.

To install it, run the command pip3 install pre-commit. You will need to restart your system for this to take effect.

Once you have restarted, open a terminal and navigate to the repo.

Run the command pre-commit install.

You can test that this worked by running pre-commit run.

Poetry

Poetry is a virtual shell that allows use to ensure you have all packages and tools set up for the repo correctly.

To install, run pip3 install poetry.

Open a terminal and navigate to the repo. Run the command poetry install. This will install all dependencies needed.

Run poetry shell to open a virtual shell environment.

Development

Branches

For each issue that you work on, you should create a new branch.

  1. Run git checkout -b feature/issue to create a new branch. Replace issue with something descriptive.
  2. Run git push to push your new branch to the repo.

Commits and Contributing

Note: Never directly commit to the develop branch! Make sure you are on a seperate branch.

  1. Once you are on a new branch, you can start writing new code.
  2. Add files to your next commit using git add <filename>.
  3. Run git commit -m "Description of changes" to commit your code to the repo.
  4. You should test your code in a poetry shell. Open the shell using poetry shell.
  5. When you attempt to commit, pre-commit should automatically check your code to make sure it is up to our standards. If you fail the tests, go back and change what it requests. You can also use the command pre-commit run to run pre-commit checks without commiting.
  6. Alternatively, if you just want to quickly push code to the repo, you can add the --no-verify flag to your git commit command to skip running pre-commit. For example, git commit --no-verify -m "Updated readme". Note, however, that your code will not be allowed to be merged into develop until it passes our pre-commit checks, so make sure you go back and fix any issues before submitting a pull request.
  7. Use git push to push your commits to the remote repo.

Pull Requests

Once you have code that you think is ready to merge into develop, you can submit a pull request.

A template for your pull requests is available at .github/PULL_REQUEST_TEMPLATE/pull_request_template.md

Your pull request should describe what changes you made and what issue you solved.

On the sidebar, request a review from your sublead, assign yourself, apply appropriate labels, add to your subteam's project board, and tie to an issue.

License

We adopt the MIT License for our projects. Please read the LICENSE file for more info

offboard-commands's People

Contributors

pre-commit-ci[bot] avatar fallscameron01 avatar cjhr95 avatar djdmvp avatar rexberry avatar

Watchers

Christopher Spencer avatar Michael Pieper avatar Samantha Baker avatar

offboard-commands's Issues

Simple Direction Commands

Offboard Directional Commands

Problem

Need some simple offboard commands to maneuver the drone quickly and efficiently without the use of higher-level MAVSDK functions. Basic movement single-directional movement across all 3 axes, as well as some diagonal commands, is desired.

Solution

Utilize the offboard commands provided by MAVSDK to directly control the drone. Learn the parameters required for each function and how each different offboard command alters the drone's orientation.

Sensor Integration

Sensor Integration into Offboard Commands

Problem

Data from the ultrasonic radar sensor must be used to determine which command to employ in a potential collision scenario.

Solution

Read the data from the sensor and determine which command to call based on the positioning of all aerial systems nearby.

Unit Tests for Offboard Commands

Unit Tests for Offboard Commands

Problem

Need simple unit tests to ensure the offboard movement controls the drone in the manner we intend/need.

Solution

The unit tests should test each movement individually, with different files for each axis.

Additional Information

The unit tests should call each function in a controlled environment, logging which functions fail.

Sensor Interfacing & Research

Ultrasonic Radar Interfacing

Problem

We must be able to interface with our obstacle avoidance sensor in Python to obtain data and translate it into information the offboard commands can use to maneuver out of the way.

Solution

Read documentation for the sensor and determine what data is returned to the main program, and how to use it properly in Python 3.10

Additional Information

All this task should do is integrate with the sensor, and determine what data is returned.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.