Friday, July 8, 2016

Summer Research Week 1 Homework

Notes for AR Drone Developer Guide, Parrot [chapt. 1-3, 17 pages]

  • AR Drone 2.0
    • quadrotor
    • opposite rotors are turning in the same direction
    • two rotors go clockwise, two rotors go counterclockwise
    • diagonal = opposites
    • powered with engines with three phases current
    • controlled by micro-controller
    • automatically detects various engines that are connected and adjusts engine controls
    • can detect scenarios to prevent damage
    • signals whenever the battery is low to prevent damage
    • comes with inertial measurment units that facilitates how the drone manuevers; it also helps with control and can sense height
    • has a camera that can stream incoming images to device
    • video frame rate starts off at 15 FPS and can go up to 30 FPS (frames per second)
  • Maneuvering the drone
    • changing the left and right rotor speeds the opposite way
      • roll movement 
        • outcome, back and forth motion
    • changing the front and rear speeds the opposite way
      • pitch movement
    • changing each rotor pair speed the opposite way
      • yaw movement
        • outcome, left and right motion
    • remote control
      • lever and trims, control UAV pitch, roll, yaw and throttle
    • easy to do because sensors can help take-off, hover, trim, and land automatically
    • pushing certain buttons can manuever the drone automatically; these settings can be tuned
      • altitude
      • yaw speed limit
      • vertical speed limit
      • AR. Drone 2.0 tilt angle limit
      • host tilt angle limit
  • Flying the Drone
    • outdoor
      • light and low wind drag configuration
    • indoor
      • has to be protected by external bumpers
      • tags can be added to external hull to allow drones to easily detect one another via their cameras
  • Client Device & Drone
    • WiFi
      • AR Drone 2.0 creates a WiFi network with ESSID
        • it gives itself an odd IP address
      • User connects device to the ESSID network provided by the drone
      • Device requests an IP address from drone DHCP server
      • Drone DHCP server gives the client an IP address with its own IP address and a numerical value between one and four
      • Client device can send requests to AR. Drone IP address and its service ports
    • Communication with Client Device
      • UDP Port 5556
        • crucial to the user
        • commands are sent frequently
        • helps with controlling and changing the drone
        • "AT commands"
      • UDP Port 5554
        • information about drone is sent to the client device
          • qualities such as position and speed
        • commands are sent frequently
        • navdata
          • has prepared Navdata receiving and decoding system
      • TCP Port 5555
        • a video stream from AR. Drone
        • images from the video stream can be decoded
      • TCP Port 5559
        • communication channel for critical data
        • retrieves configuration data and figures out which information is important
  • AR. Drone Vocabulary 
    • soft - drone-specific code
      • common - header (.h) files that describe the communication structures used by the drone
        • pack C structures when compiling them
      • Liblardrone_tool - set of tools that makes the user's experience easier by making it simpler to use the drone
      • Liblutils - set of tools used to write applications based on the AR. Drone
    • FFMPEG - has complete snapshots of FFMPEG library with build scripts for AR. Drone applications
    • ITTIAM - already written and highly optimized video decoding library for iOS and Android applications
    • VPSDK - has libraries with different functions
      • VPSTAGES - video processing pieces, allows the user to build a video processing pipeline
      • VPOS - multiplatform (Linux/Windows/Parrot) wrappers for functions such as memory allocation and thread management
      • VPCOM - multiplatform wrappers for communication through WiFi and Bluetooth
      • VPAPI - helps to manage video pipelines and threads 
    • ardrone_tool.c - has a prepared ardone_tool_main C function which starts the WiFi network and communication with the drone
    • UI - prepared gamepad management code
    • AT - all functions that can be used to control the AR. Drone 2.0
      • use AT command and is backed up with the correct syntax and sequencing number 
        • forwarded to the AT management thread
    • academy - prepared downloading and uploading system for AR. Drone Academy
      • also includes management of the photo shooting
    • control - prepared AR. Drone configuration management tool
  • AR. Drone 2.0 Threads
    • ARDroneTool is part of the AR. Drone 2.0 Library and provides:
      • AT command management thread
        • collects the commands sent by the other threads and orders them with a specific sequence number
      • navdata management thread
        • receives navdata stream and decodes it
        • provides a prepared navigation data through call-back 
      • video management thread
        • receives the video stream
        • provides a prepared video data through call-back
      • video recorder thread
        • manages the HD stream recording 
        • manages .mp4/.mov encapsulation
      • control thread
        • regulates the requests form other threads that send commands from the drone
        • makes sure that the requests match up with the drone's settings
      • threads for AR. Drone Academy
        • receives the photoshooting (.jpg) by ftp protocool
        • manages userbox binary data receives and uploads to AR. Academy server
      • all threads are built to assist the drone through vp_com library which is in charge of reconnecting the drone when necessary
      • all threads are enabled by ardone_tool_main which is provided in ardrone_tool.c file
  • AR. Drone 2.0 for Apple iOS Devices
    • AR. drone Engine (ControlEnginel folder) provides all the applications needed for iOS devices to use the device
    • provides a common drone API and user interface
    • only interface to drone from the iOS application
    • purpose is to access the ARDroneLIB
    • AR. Drone Engine automatically opens, receives, and decodes video stream coming from drone
      • does not render the decoded frames on screen
      • in charge of showing frames
    • provides HUD with  different input buttons and data about the condition of the drone
      • back
        • return to the home screen and pauses the ARDroneTool
          • this setting can be stopped in HUD configuration
      • settings
        • shows the AR. Drone settings screen
      • emergency
        • puts an end to the AR. Drone engines no matter what it is doing
      • switch
        • alternates between the cameras of the drone
          • this setting can be stopped in HUD configuration
      • record
        • begins and ends the recording
          • this setting can be stopped in HUD configuration
      • screenshot
        • takes a photo from the front facing camera of the drone
          • this setting can be stopped in HUD configuration
      • take off/landing
        • helps the drone either take off if it is on ground or land if it is flying
        • the take-off button resets emergency state 
      • battery level
        • the drone's battery is shown numerically
          • this setting can be stopped in HUD configuration
      • WiFi indicator
        • provides a quality estimation of the WiFi link with drone
      • USB indicator
        • displays the record time on the USB drive if there is a USB plugged 
      • Warning message label
        • CONTROL LINK NOT AVAILABLE
          • wifi connection lost
        • START NOT RECEIVED
          • drone was not able to take off when commanded
        • CUT OUT EMERGENCY
          • motor(s) were stopped by environment
        • MOTORS EMERGENCY
          • motor(s) not responding to commands
        • CAMERA EMERGENCY
          • camera(s) not functioning
        • PIC WATCHDOG EMERGENCY
          • navboard is not responding
        • PIC VERSION EMERGENCY
          • navboard is not updated
        • TOO MUCH ANGEL EMERGENCY
          • drone's euler angles went too high
            • motors are shut down to prevent damage
        • BATTERY LOW EMERGENCY
          • automatically lands the drone
        • USER EMERGENCY
          • emergency button pressed
        • ULTRASOUND EMERGENCY
          • sensor for ultrasound not functioning
        • UNKNOWN EMERGENCY
          • should not happen if applications are updated
        • VIDEO CONNECTION ALERT
          • stream cannot be received
        • BATTERY LOW ALERT
          • cannot take-off because low battery
          • if flying, nothing happens
        • ULTRASOUND ALERT
          • cannot detect altitude of drone
        • VISION ALERT
          • cannot estimate speed from bottom facing camera

Notes from AR. Drone 2.0 Tutorial Video #1 and #2
  • Connect AR. Drone to battery
  • Lights on the drone's four motors will turn green when it is ready
  • Connect the device to the drone via WiFi
  • Use the application to use the drone
  • Reset WiFi and reopen the application after update
  • Buttons displayed on the device are used to control the drone's movement
  • Displays on the right of Emergency
    • use vertical camera under drone
    • start and stop recording
    • camera
  • You can change settings from the pre-set beginner settings
    • remember to adjust indoor or outdoor
      • different hulls for indoor and outdoor
  • Before taking off, make sure the drone is flat on the ground
    • Press Flat Trim, calibrates AR Drone and confirms position
    • Front camera is in front and stand behind
    • Take Off
  • Right Button, rotate and altitude
    • Up or down, higher or lower
    • Left or right, left or right
  • Left Button
    • tilt device forward to move around
      • when not pressed then it hovers around the area
    • joystick mode can be enabled in settings to avoid tilting device
  • Absolute Control
    • press calibration
    • overcome difficulties position in flight 
  • Flip
    • enable the function
    • press screen twice rapidly

After reading the first three chapters of the guide, we felt overwhelmed because there was a lot of information to take in. There were so many new terms and functions that we had to know in order to control the drone. Information about the actual drone is not essential, but the warnings and the applications are definitely needed to maneuver the drone well. We also thought that the reading seemed biased when describing the quality of the drone; the guide claimed that the drone was super simple to use and efficient which could be exaggerated. The videos were extremely helpful because they summarized the information in the guide within 7 minutes. I found it more entertaining and it is easier to understand. We did not get to fly the drone because we could not meet up, but we completed the assignment.

Questions
  1. What is Navdata or Navboard?
  2. How does the drone give itself an IP address and why is it always odd?
  3.  What is the purpose of the drone DHCP server giving a numerical value between one to four?

No comments:

Post a Comment