Giter Club home page Giter Club logo

mind-the-drone's Introduction

Installation

Install npm (sudo apt-get install npm) and run npm install in the main directory of this repository.

Usage

Starting the server

To start the server run node index.js in the main directory of this repository. Check with your motion caption software whether the UDP port is correct. If it's not, change it in index.js.

Controlling drones

To control the drones, visit the web url reported when starting the server. You can manually control a drone with W, A, S and D for forwards, left, backwards and right respectively. Use Q and E for rotating the drone and Up and Down to move the drone, well, up and down. Clicking the car icon will let the program control the drone.

To-Do

  • Don't hard code states in models/views.js:75-84
  • Look at sent_last in models/views.js:16
  • Add recover button
    • Add button in view
    • Read information from navdata for button colour
    • Write function that recovers drone (docs)
    • Make clicking button execute said function
      • Socket listener thing (similar to index.js:52-68)
      • Socket shouter thing (similar to views/overview.html, search for App.socket.emit)
  • || true ?! in flock.js:143
  • Make 9999 look nicer models/views.js:87
  • Make EegCommand in target.js read json objects
  • Don't pass this.go as an argument at models/flock.js:210, but figure out why using this inside MoveAutopilot doesn't work and fix it in a nicer way.
  • Make sure the user notices when models/target.js:14 produces a syntax error.
  • Remove everything we aren't using.

Thoughts

  • It seems like return calc || stop; in models/control.jsis a bad idea. Isn't it better to send no command instead of telling it to stop?
  • We could listen for commands coming from the view (separately from commands coming from the EEG)? To control whether EEG commands are executed, the view then just flips a boolean that is checked by the EEG.
  • A second command executed before the first finished breaks things. Solutions:
    • Save a boolean in the state of a drone showing whether it's already obeying a command. If it is, the current command is ignored.
    • Save a queue somewhere. Every executed command is added to the queue and the drone (magically?) executes all commands in the queue.
    • Save the end of the last command as a time stamp in the state of a drone and have QueueCommand start the command at that moment. There doesn't seem to be a "execute at time stamp" function in Node, but there is an "execute after delay" function. This could be hacked by correctly delaying both the start and stop messages.

Attributions

This repository contains code written here.

mind-the-drone's People

Contributors

mpvharmelen avatar vernadankers avatar

Watchers

James Cloos avatar Derk Barten 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.