Giter VIP home page Giter VIP logo

autonomous-drone's Introduction

Autonomous Drone (WORK IN PROGRESS)

Some keywords:

  • Pixhawk
  • Rasperry Pi
  • Robot Operating System (ROS)
  • Monovision
  • Ultrasonic sensors
  • Obstacle avoidance
  • Collision prevention
  • QGroundControl

Goal

Reach level 4 autonomy with cheap sensors only.

ROS Packaage

https://github.com/dippa-1/ros2_ultrasonic_sensor

autonomous-drone's People

Contributors

dippa-1 avatar

Watchers

 avatar

autonomous-drone's Issues

Ultraschallsensoren einlesen unter Raspbian OS

ToDo: Ultraschallsenoren zum Test einlesen
Mit folgendem Skript getestet:

import RPi.GPIO as GPIO
import time

#GPIO Modus (BOARD / BCM)
GPIO.setmode(GPIO.BCM)

#GPIO Pins zuweisen
GPIO_TRIGGER = 23
GPIO_ECHO = 24

#Richtung der GPIO-Pins festlegen (IN / OUT)
GPIO.setup(GPIO_TRIGGER, GPIO.OUT)
GPIO.setup(GPIO_ECHO, GPIO.IN)

def distanz():
    # setze Trigger auf HIGH
    GPIO.output(GPIO_TRIGGER, True)

    # setze Trigger nach 0.01ms aus LOW
    time.sleep(0.00001)
    GPIO.output(GPIO_TRIGGER, False)

    StartZeit = time.time()
    StopZeit = time.time()

    # speichere Startzeit
    while GPIO.input(GPIO_ECHO) == 0:
        StartZeit = time.time()

    # speichere Ankunftszeit
    while GPIO.input(GPIO_ECHO) == 1:
        StopZeit = time.time()

    # Zeit Differenz zwischen Start und Ankunft
    TimeElapsed = StopZeit - StartZeit
    # mit der Schallgeschwindigkeit (34300 cm/s) multiplizieren
    # und durch 2 teilen, da hin und zurueck
    distanz = (TimeElapsed * 34300) / 2

    return distanz

if __name__ == '__main__':
    try:
        while True:
            abstand = distanz()
            print ("Gemessene Entfernung = %.1f cm" % abstand)
            time.sleep(1)

        # Beim Abbruch durch STRG+C resetten
    except KeyboardInterrupt:
        print("Messung vom User gestoppt")
        GPIO.cleanup()

Docker Container für ROS und Pi GPIO erstellen

  • Das ROS Image wird verwendet und um die GPIO Bibliothek erweitert.
  • Dann wird testweise innerhalb des Containers eine LED blinken gelassen.
  • Zum Schluss muss entweder mit dem Container von außen kommuniziert werden, oder man entwickelt einfach alles in diesem Container, was wahrscheinlich besser ist. Also ROS Nodes, #4 , #6 , #7 .

ROS baut nicht

ros2 run demo_nodes_cpp talker
-bash: ros2: command not found

GPS Daten vom Pixhawk bekommen

  1. Pi frägt Position an
  2. Pixhawk schickt Position
  3. Pi berechnet direkten Vektor da hin mit Richtung & Geschwindigkeit
  4. Pi schickt Flugbefehle an Pixhawk

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.