Giter VIP home page Giter VIP logo

ufo-1's Introduction

๐Ÿš€ ๐Ÿ‘พ U.F.O: Universal Flying Objects

ufo dependency status

A Drone/UAV/Quadcopter/RC Plane programming library for Rust.

FYI: this is still a WIP, the traits and structs exist, but examples and documentation are lacking... Proceed with caution.

Goals

  1. Build an extensible modular library that can support an infinite number of UAVs.
  2. Handle as much of the boiler plate as possible. (Things just work)
  3. Low Latency Between Drone and Controller

Non-Goals

  • Implement A UI for controlling UAVs (NOTE: I may decide to build a UI later on, but it will be in its own repository)
    • For controlling the drones using a keyboard checkout mothership
  • Support other types of robotics/RCs, right now this crate is for RC Drones and Planes. This may change at a later date, but not right now.

Supported drones

Right now UFO supports the following drones:

  • JJRC H61

Feel free to implement controls for your own drone and submit it in a pull request.

Installation and usage

Add this to your Cargo.toml

[dependencies]
ufo_rs = "*"

And put something like this in src/main.rs

/// Import std stuff
use std::error::Error;
use std::time::Duration;
use std::thread;

// Import traits
use ufo_rs::traits::control::*;
use ufo_rs::traits::drone::*;

// Import controller
use ufo_rs::drones::jjrc::h61;

fn main() -> Result<(), Box<dyn Error>> {
    let delay = Duration::from_millis(2000);

    // Create a new drone driver
    let mut driver = h61::Driver::new();

    // Connect to drone
    driver.connect()?;

    // Calibrate drone 

    println!("Calibrating...");

    driver.calibrate()?;

    println!("Sent!");

    // Wait 2 seconds
    thread::sleep(delay);
    
    // Take off
    println!("Taking off...");

    driver.take_off()?;

    println!("Sent!");

    // Wait again for 1 second
    thread::sleep(Duration::from_millis(1000));

    // Land
    println!("Landing...");

    driver.land()?;
    
    println!("Sent!");


    // Ta-dah!
    Ok(())
}

See the examples/ directory for more information.

Help out

If you want to help with U.F.O, we could use support in two areas:

  1. Writing Unit Tests, I want to make sure the U.F.O. is a safe and stable way to program drones. If we can find areas prone to bugs, we can build a more stable library quickly.
  2. Adding support for more drones. If you would like to help with this or to see an example, please take a look at src/drones/jjrc/h61.rs.

Inspiration:

Inspired by:

  • Gobot: Really cool robotics library for Go
  • A lack of a drone library for Rust
  • Flying things with code is fun ๐Ÿ˜„!

ufo-1's People

Contributors

ajmwagar avatar atul9 avatar

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.