Monday, September 7, 2015

More Notes: Process Ideas

Method
  • The client gives a compiled list of commands to follow. The commands could be directions.
    • directions are of two types (each corresponding to yaw changes):
      • Left   (Ø°)
      • Right (Ø°)
    • at each corner is a tag (preliminarily a color, later a unique tag to match)
    • the direction indicates which tag to seek next
    • TEST: wall tags vs. floor tags?
      • wall tags are simpler to find (only frontal camera)
      • floor tags are more adaptable (not every corner ends with a wall)

AR.Drone Programming Protocols

  • In case the packet contains more than one command, the new line byte \r 0x0A is used to separate the commands.
  • Strings are encoded as 8-bit ASCII characters
  • The maximum length of the command is 1024 characters
  • 30 MS delay must be passed between the commands
  • Commands should be no more than 2 seconds apart (continuous commands is better)
  • The client must use the host AT command port to communicate 
  • See developer guide, sec.6 for more on AT command syntax
  • The IP address of the drone is 192.168.1.1 and there are three ports we can use to connect over UDP:
    • Navigation Data Port = 5554
    • On-Board Video Port = 5555
    • AT Command Port = 5556
  • AT*FTRIM = #<LF>                                                                
    • Command for horizontal calibration (flat trim)
    • #=1 
    • LF = return character
  • AT*REF = #,0001000101010100000000†§00000000<LF>   
    • Argument 1 is sent as an integer (written here is its derivative binary form).
    • §(1=change)(0=stay|stopEmergency)
    • †(1=upUntilLifted)(0=downUntilLanded) 
  • AT*PCMD = #,€,R,P,G,Y<LF>
    • €(1=readCommands)(0=hover)
    • R(-1,1 = roll)
    • P(-1,1 = pitch)
    • G(-1,1 = gaz)
    • Y(-1,1 = yaw)
    • -1,1 = float corresponds to %age of preset power range, in the format of its equivalent integer.
  • AT*LED = #,@,F,D<LF>
    • @ = predefined animation tag number (int 0-20)
    • F = frequency (delay between commands)
    • D = duration (number of times)


Resources

— A tutorial for programming the AR.Drone (communication syntax):
— More info on the drone-computer communication
— Processing to communicate using UDP in oscP5 library (I would prefer something like
     this, as I am familiar with Processing)
— Processing to communicate using created AR Drone library (if previous resource's option
    doesn't work)
— Float to binary conversion (for commands, float > binary > integer is a necessary conversion)

To Research Next

  • Receiving drone's navdata
  • Receiving drone's video
  • Image matching
  • Color-searching

No comments:

Post a Comment