Sha256: 9d86cea0641053a1afee9f801ea62aae4e74ebba0835827bc0dfd3a90a130fdd

Contents?: true

Size: 714 Bytes

Versions: 26

Compression:

Stored size: 714 Bytes

Contents

require 'artoo/robot'

class DroneRobot < Artoo::Robot
  connection :drone, :adaptor => :ardrone
  device :drone, :driver => :ardrone

  #api :host => '127.0.0.1', :port => '8080'

  work do
    drone.start

    after(10.seconds){
      drone.take_off
      drone.hover
    }
    after(15.seconds){
      drone.turn_right(0.3)
    }
    after(25.seconds){
      drone.hover
    }
    after(30.seconds){
      drone.land
    }
  end
end

DRONES = {"192.168.0.43:5556" => "wedge",
           "192.168.0.44:5556" => "biggs"}
robots = []
DRONES.each_key {|p|
  robots << DroneRobot.new(:connections =>
                              {:drone =>
                                {:port => p}})
}

DroneRobot.work!(robots)

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
artoo-1.8.2 examples/ardrone_multi.rb
artoo-1.8.1 examples/ardrone_multi.rb
artoo-1.8.0 examples/ardrone_multi.rb
artoo-1.6.7 examples/ardrone_multi.rb
artoo-1.6.6 examples/ardrone_multi.rb
artoo-1.6.5 examples/ardrone_multi.rb
artoo-1.6.4 examples/ardrone_multi.rb
artoo-1.6.3 examples/ardrone_multi.rb
artoo-1.6.2 examples/ardrone_multi.rb
artoo-1.6.1 examples/ardrone_multi.rb
artoo-1.6.0 examples/ardrone_multi.rb
artoo-1.5.0 examples/ardrone_multi.rb
artoo-1.4.1 examples/ardrone_multi.rb
artoo-1.4.0 examples/ardrone_multi.rb
artoo-1.3.0 examples/ardrone_multi.rb
artoo-1.2.2 examples/ardrone_multi.rb
artoo-1.2.1 examples/ardrone_multi.rb
artoo-1.2.0 examples/ardrone_multi.rb
artoo-1.1.1 examples/ardrone_multi.rb
artoo-1.1.0 examples/ardrone_multi.rb