artoo-ardrone 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2bc5acd4687ec069209f7bb716184b457813530d
4
- data.tar.gz: 60232183554a45cc4faa9c9fc966e3366b651dd5
3
+ metadata.gz: 5f6041cd5e75911fb7c57340bb32eb5c5d0a38f7
4
+ data.tar.gz: 3bfcf7537ccdc036629ef87edc0cb7c8bb159eba
5
5
  SHA512:
6
- metadata.gz: 9f670ede922a86b83dbe08a8d298a554c78d0828e551a5e2bfbac5028ec72d6f600f166b197859673ec3a131952a7d59c8e9a6d645cde599b5804da23e929c05
7
- data.tar.gz: 0033765d9674b4d3ab3a21dc8ac254641eed1a51882e1ca28db68aa36297acc38c96b00efd5e08026b5cf4f047e95e3a3163ca005255fed24a4857904eb98168
6
+ metadata.gz: 1b38650e04900693ff7c6e35e92f9cdf0e616ec90146e3e256c431b0cb5f498d21cfd4c2d391de0c689700dffd715dd369484909043dcdd87f52e5c897454186
7
+ data.tar.gz: b46fbea0e36b05e1cfc33e3272c145bd1e9eac8e660a4fda25402e85a90ffe7eb0aac3caa974cb0844f87615ac3c0fd304a208a3977a9c3ef83ad32613c6cf83
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- artoo-ardrone (1.2.0)
5
- artoo (>= 1.3.0)
4
+ artoo-ardrone (1.3.0)
5
+ artoo (>= 1.4.0)
6
6
  hybridgroup-argus (>= 0.5.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- artoo (1.3.0)
11
+ artoo (1.4.1)
12
12
  celluloid (~> 0.15.0)
13
13
  celluloid-io (~> 0.15.0)
14
14
  multi_json (~> 1.6)
@@ -25,7 +25,7 @@ GEM
25
25
  http (0.5.0)
26
26
  http_parser.rb
27
27
  http_parser.rb (0.6.0.beta.2)
28
- hybridgroup-argus (0.5.0)
28
+ hybridgroup-argus (0.5.1)
29
29
  metaclass (0.0.1)
30
30
  method_source (0.8.2)
31
31
  minitest (5.0.1)
data/README.md CHANGED
@@ -24,11 +24,7 @@ connection :ardrone, :adaptor => :ardrone
24
24
  device :drone, :driver => :ardrone, :connection => :ardrone
25
25
 
26
26
  work do
27
- on drone, :ready => :fly
28
27
  drone.start
29
- end
30
-
31
- def fly(*data)
32
28
  drone.take_off
33
29
  after(15.seconds) { drone.hover.land }
34
30
  after(20.seconds) { drone.stop }
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_runtime_dependency 'artoo', '>= 1.3.0'
22
+ s.add_runtime_dependency 'artoo', '>= 1.4.0'
23
23
  s.add_runtime_dependency 'hybridgroup-argus', '>= 0.5.0'
24
24
  s.add_development_dependency 'minitest', '>= 5.0'
25
25
  s.add_development_dependency 'minitest-happy'
@@ -1,9 +1,9 @@
1
1
  require 'artoo'
2
2
 
3
- connection :ardrone, :adaptor => :ardrone
3
+ connection :ardrone, :adaptor => :ardrone, :port => '192.168.1.1:5556'
4
4
  device :drone, :driver => :ardrone, :connection => :ardrone
5
5
 
6
- connection :navigation, :adaptor => :ardrone_navigation
6
+ connection :navigation, :adaptor => :ardrone_navigation, :port => '192.168.1.1:5554'
7
7
  device :nav, :driver => :ardrone_navigation, :connection => :navigation
8
8
 
9
9
  work do
@@ -13,7 +13,7 @@ end
13
13
 
14
14
  def fly(*data)
15
15
  drone.take_off
16
- after(10.seconds) { drone.animate(:turnaround, 3000) }
16
+ after(10.seconds) { drone.animate(:flip_ahead, 1000) }
17
17
  after(15.seconds) { drone.hover.land }
18
18
  after(20.seconds) { drone.stop }
19
19
  end
@@ -1,6 +1,6 @@
1
1
  require 'artoo'
2
2
 
3
- connection :ardrone, :adaptor => :ardrone
3
+ connection :ardrone, :adaptor => :ardrone, :port => '192.168.1.1:5556'
4
4
  device :drone, :driver => :ardrone, :connection => :ardrone
5
5
 
6
6
  connection :navigation, :adaptor => :ardrone_navigation, :port => '192.168.1.1:5554'
@@ -1,5 +1,5 @@
1
1
  module Artoo
2
2
  module Ardrone
3
- VERSION = '1.2.0'
3
+ VERSION = '1.3.0'
4
4
  end
5
5
  end
@@ -5,28 +5,20 @@ module Artoo
5
5
  # This class connects to a ARDrone 2.0
6
6
  # @see http://rubydoc.info/gems/hybridgroup-argus/0.2.0/Argus/Drone Argus Drone Documentation
7
7
  class Ardrone < Adaptor
8
- finalizer :finalize
9
8
  attr_reader :ardrone
10
9
 
11
- # Finalizes connection with ARDrone by landing and stopping the device
12
- def finalize
13
- if connected?
14
- ardrone.land
15
- ardrone.stop
16
- end
17
- end
18
-
19
10
  # Creates Argus Drone connection with device
20
11
  # @return [Boolean]
21
12
  def connect
22
13
  require 'argus' unless defined?(::Argus::Drone)
23
- @ardrone = ::Argus::Drone.new(socket: connect_to_udp, host: port.host, port: port.port)
14
+ @ardrone = ::Argus::Drone.new(socket: connect_to_udp, remote_host: port.host, port: port.port)
24
15
  super
25
16
  end
26
17
 
27
18
  # Disconnects device by stopping it and ending connection
28
19
  # @return [Boolean]
29
20
  def disconnect
21
+ ardrone.land
30
22
  ardrone.stop
31
23
  super
32
24
  end
@@ -11,6 +11,7 @@ module Artoo
11
11
  # @return [Boolean]
12
12
  def connect
13
13
  require 'argus' unless defined?(::Argus::NavStreamer)
14
+ puts "nav", port.host, port.port
14
15
  @ardrone = ::Argus::NavStreamer.new(socket: connect_to_udp, remote_host: port.host, port: port.port.to_i)
15
16
  @ardrone.start
16
17
  super
@@ -7,7 +7,7 @@ module Artoo
7
7
  class Ardrone < Driver
8
8
  COMMANDS = [:start, :stop, :hover, :land, :take_off, :enable_emergency, :disable_emergency,
9
9
  :front_camera, :bottom_camera, :up, :down, :left, :right,
10
- :forward, :backward, :turn_left, :turn_right, :reset_watchdog, :led].freeze
10
+ :forward, :backward, :turn_left, :turn_right, :reset_watchdog, :led, :animate].freeze
11
11
 
12
12
  def start(nav=nil)
13
13
  connection.start(false) # send false, so Argus does not use NavMonitor
@@ -17,6 +17,7 @@ describe Artoo::Adaptors::Ardrone do
17
17
  it 'Artoo::Adaptors::Ardrone#disconnect' do
18
18
  @adaptor.connect
19
19
 
20
+ @ardrone.expects(:land)
20
21
  @ardrone.expects(:stop)
21
22
  @adaptor.disconnect
22
23
  @adaptor.connected?.must_equal false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artoo-ardrone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Evans
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-10-17 00:00:00.000000000 Z
15
+ date: 2013-10-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: artoo
@@ -20,14 +20,14 @@ dependencies:
20
20
  requirements:
21
21
  - - '>='
22
22
  - !ruby/object:Gem::Version
23
- version: 1.3.0
23
+ version: 1.4.0
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - '>='
29
29
  - !ruby/object:Gem::Version
30
- version: 1.3.0
30
+ version: 1.4.0
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: hybridgroup-argus
33
33
  requirement: !ruby/object:Gem::Requirement