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 +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +0 -4
- data/artoo-ardrone.gemspec +1 -1
- data/examples/ardrone_animate.rb +3 -3
- data/examples/ardrone_autoreset.rb +1 -1
- data/lib/artoo-ardrone/version.rb +1 -1
- data/lib/artoo/adaptors/ardrone.rb +2 -10
- data/lib/artoo/adaptors/ardrone_navigation.rb +1 -0
- data/lib/artoo/drivers/ardrone.rb +1 -1
- data/test/adaptors/ardrone_test.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f6041cd5e75911fb7c57340bb32eb5c5d0a38f7
|
4
|
+
data.tar.gz: 3bfcf7537ccdc036629ef87edc0cb7c8bb159eba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b38650e04900693ff7c6e35e92f9cdf0e616ec90146e3e256c431b0cb5f498d21cfd4c2d391de0c689700dffd715dd369484909043dcdd87f52e5c897454186
|
7
|
+
data.tar.gz: b46fbea0e36b05e1cfc33e3272c145bd1e9eac8e660a4fda25402e85a90ffe7eb0aac3caa974cb0844f87615ac3c0fd304a208a3977a9c3ef83ad32613c6cf83
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
artoo-ardrone (1.
|
5
|
-
artoo (>= 1.
|
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.
|
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.
|
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 }
|
data/artoo-ardrone.gemspec
CHANGED
@@ -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.
|
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'
|
data/examples/ardrone_animate.rb
CHANGED
@@ -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(:
|
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'
|
@@ -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,
|
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
|
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.
|
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-
|
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.
|
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.
|
30
|
+
version: 1.4.0
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: hybridgroup-argus
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|