artoo-ardrone 1.0.2.pre → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +19 -22
- data/artoo-ardrone.gemspec +2 -2
- data/examples/ardrone_nav.rb +20 -0
- data/examples/ardrone_video.rb +22 -0
- data/lib/artoo-ardrone/version.rb +1 -1
- data/lib/artoo/adaptors/ardrone.rb +1 -1
- data/lib/artoo/adaptors/ardrone_navigation.rb +2 -2
- data/lib/artoo/adaptors/ardrone_video.rb +2 -1
- data/lib/artoo/drivers/ardrone.rb +3 -1
- data/lib/artoo/drivers/ardrone_navigation.rb +2 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37ac5db8e1d48c16c99f52fcf9f1ca95f1d41ba6
|
4
|
+
data.tar.gz: f2fec1d9c38c032146bf68f7abd1208048ff10a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85a8b807a06a9363c3d5e22e13d97efd6035e78b91a244e7cb9975942c571afaf44afcd5db2c315b28e1b7659da13470363db9a78644fd3eb19f3f7a4a12b7f1
|
7
|
+
data.tar.gz: a70c856b41380eabb89274f492ca445324cfc1de1efe8c8a0d7fd10c9d24704a74abe4a531bc1d8fb738c1486a644f4d100a401f7f801873835e1e2d563b5a9f
|
data/Gemfile.lock
CHANGED
@@ -1,33 +1,31 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
artoo-ardrone (1.0.
|
5
|
-
|
6
|
-
|
4
|
+
artoo-ardrone (1.0.3)
|
5
|
+
argus (~> 0.4.0)
|
6
|
+
artoo (~> 1.1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
|
12
|
-
|
13
|
-
celluloid
|
11
|
+
argus (0.4.0)
|
12
|
+
artoo (1.1.0)
|
13
|
+
celluloid (~> 0.15.0)
|
14
|
+
celluloid-io (~> 0.15.0)
|
14
15
|
multi_json (~> 1.6)
|
15
16
|
pry (~> 0.9)
|
16
17
|
rake (~> 10.0)
|
17
18
|
reel (~> 0.4.0.pre)
|
18
19
|
thor (~> 0.18.1)
|
19
|
-
celluloid (0.15.
|
20
|
-
timers (
|
21
|
-
celluloid-io (0.15.0
|
22
|
-
celluloid (>= 0.15.0
|
20
|
+
celluloid (0.15.1)
|
21
|
+
timers (~> 1.1.0)
|
22
|
+
celluloid-io (0.15.0)
|
23
|
+
celluloid (>= 0.15.0)
|
23
24
|
nio4r (>= 0.5.0)
|
24
|
-
certified (0.1.1)
|
25
25
|
coderay (1.0.9)
|
26
|
-
http (0.
|
27
|
-
certified
|
26
|
+
http (0.5.0.pre)
|
28
27
|
http_parser.rb
|
29
|
-
http_parser.rb (0.
|
30
|
-
hybridgroup-argus (0.4.0)
|
28
|
+
http_parser.rb (0.6.0.beta.2)
|
31
29
|
metaclass (0.0.1)
|
32
30
|
method_source (0.8.2)
|
33
31
|
minitest (5.0.1)
|
@@ -40,14 +38,13 @@ GEM
|
|
40
38
|
coderay (~> 1.0.5)
|
41
39
|
method_source (~> 0.8)
|
42
40
|
slop (~> 3.4)
|
43
|
-
rack (1.5.2)
|
44
41
|
rake (10.1.0)
|
45
|
-
reel (0.4.0.
|
46
|
-
celluloid
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
websocket_parser (>= 0.1.
|
42
|
+
reel (0.4.0.pre4)
|
43
|
+
celluloid (>= 0.15.0)
|
44
|
+
celluloid-io (>= 0.15.0)
|
45
|
+
http (>= 0.5.0.pre)
|
46
|
+
http_parser.rb (>= 0.6.0.beta.2)
|
47
|
+
websocket_parser (>= 0.1.4)
|
51
48
|
slop (3.4.6)
|
52
49
|
thor (0.18.1)
|
53
50
|
timers (1.1.0)
|
data/artoo-ardrone.gemspec
CHANGED
@@ -19,8 +19,8 @@ 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.1.0
|
23
|
-
s.add_runtime_dependency '
|
22
|
+
s.add_runtime_dependency 'artoo', '~> 1.1.0'
|
23
|
+
s.add_runtime_dependency 'argus', '~> 0.4.0'
|
24
24
|
s.add_development_dependency 'minitest', '~> 5.0'
|
25
25
|
s.add_development_dependency 'minitest-happy'
|
26
26
|
s.add_development_dependency 'mocha', '~> 0.14.0'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'artoo'
|
2
|
+
|
3
|
+
connection :ardrone, :adaptor => :ardrone, :port => '192.168.1.1:5556'
|
4
|
+
device :drone, :driver => :ardrone, :connection => :ardrone
|
5
|
+
|
6
|
+
connection :navigation, :adaptor => :ardrone_navigation, :port => '192.168.1.1:5554'
|
7
|
+
device :nav, :driver => :ardrone_navigation, :connection => :navigation
|
8
|
+
|
9
|
+
work do
|
10
|
+
on nav, :navdata => :nav_update
|
11
|
+
drone.start
|
12
|
+
drone.take_off
|
13
|
+
|
14
|
+
after(25.seconds) { drone.hover.land }
|
15
|
+
after(30.seconds) { drone.stop }
|
16
|
+
end
|
17
|
+
|
18
|
+
def nav_update(*data)
|
19
|
+
p "#{data[1].inspect}"
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'artoo'
|
2
|
+
|
3
|
+
connection :ardrone, :adaptor => :ardrone, :port => '192.168.1.1:5556'
|
4
|
+
device :drone, :driver => :ardrone, :connection => :ardrone
|
5
|
+
|
6
|
+
connection :videodrone, :adaptor => :ardrone_video, :port => '192.168.1.1:5555'
|
7
|
+
device :video, :driver => :ardrone_video, :connection => :videodrone
|
8
|
+
|
9
|
+
work do
|
10
|
+
on video, :frame => :v_frame
|
11
|
+
drone.start
|
12
|
+
drone.take_off
|
13
|
+
|
14
|
+
after(25.seconds) { drone.hover.land }
|
15
|
+
after(30.seconds) { drone.stop }
|
16
|
+
end
|
17
|
+
|
18
|
+
def v_frame(*data)
|
19
|
+
@count ||= 0
|
20
|
+
@count += 1
|
21
|
+
puts "Frame# #{@count} #{data[1].size} bytes"
|
22
|
+
end
|
@@ -19,7 +19,7 @@ module Artoo
|
|
19
19
|
# Creates Argus Drone connection with device
|
20
20
|
# @return [Boolean]
|
21
21
|
def connect
|
22
|
-
require 'argus' unless defined?(
|
22
|
+
require 'argus' unless defined?(Argus)
|
23
23
|
@ardrone = Argus::Drone.new(socket: connect_to_udp, host: port.host, port: port.port)
|
24
24
|
super
|
25
25
|
end
|
@@ -10,8 +10,8 @@ module Artoo
|
|
10
10
|
# Creates connection with Argus NavStreamer and starts ardrone device
|
11
11
|
# @return [Boolean]
|
12
12
|
def connect
|
13
|
-
require 'argus' unless defined?(
|
14
|
-
@ardrone = Argus::NavStreamer.new(socket: connect_to_udp,
|
13
|
+
require 'argus' unless defined?(Argus)
|
14
|
+
@ardrone = Argus::NavStreamer.new(socket: connect_to_udp, remote_host: port.host, port: port.port.to_i)
|
15
15
|
@ardrone.start
|
16
16
|
super
|
17
17
|
end
|
@@ -12,7 +12,8 @@ module Artoo
|
|
12
12
|
# Argus PaVE Parser starting a stream with ardrone device
|
13
13
|
# @return [Boolean]
|
14
14
|
def connect
|
15
|
-
require 'argus' unless defined?(
|
15
|
+
require 'argus' unless defined?(Argus)
|
16
|
+
require 'argus'
|
16
17
|
@ardrone = Argus::VideoStreamer.new(socket: connect_to_tcp, host: port.host, post: port.port)
|
17
18
|
@ardrone.start(connect_to_udp)
|
18
19
|
super
|
@@ -5,7 +5,9 @@ module Artoo
|
|
5
5
|
# Ardrone driver behaviors
|
6
6
|
# @see https://github.com/hybridgroup/argus/blob/master/lib/argus/drone.rb Argus::Drone docs for supported actions
|
7
7
|
class Ardrone < Driver
|
8
|
-
COMMANDS = [:start, :stop, :hover, :land, :take_off, :emergency,
|
8
|
+
COMMANDS = [:start, :stop, :hover, :land, :take_off, :emergency,
|
9
|
+
:front_camera, :bottom_camera, :up, :down, :left, :right,
|
10
|
+
:forward, :backward, :turn_left, :turn_right].freeze
|
9
11
|
|
10
12
|
def start
|
11
13
|
connection.start(false) # send false, so Argus does not use NavMonitor
|
@@ -18,7 +18,8 @@ module Artoo
|
|
18
18
|
# and event in update topic for it
|
19
19
|
def handle_update
|
20
20
|
navdata = connection.receive_data
|
21
|
-
publish(event_topic_name("update"), navdata)
|
21
|
+
publish(event_topic_name("update"), "navdata", navdata)
|
22
|
+
publish(event_topic_name("navdata"), navdata)
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
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.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ron Evans
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: artoo
|
@@ -17,16 +17,16 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.1.0
|
20
|
+
version: 1.1.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.1.0
|
27
|
+
version: 1.1.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: argus
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
@@ -98,6 +98,8 @@ files:
|
|
98
98
|
- Rakefile
|
99
99
|
- artoo-ardrone.gemspec
|
100
100
|
- examples/ardrone.rb
|
101
|
+
- examples/ardrone_nav.rb
|
102
|
+
- examples/ardrone_video.rb
|
101
103
|
- lib/artoo-ardrone.rb
|
102
104
|
- lib/artoo-ardrone/version.rb
|
103
105
|
- lib/artoo/adaptors/ardrone.rb
|
@@ -125,9 +127,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
125
127
|
version: '0'
|
126
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
129
|
requirements:
|
128
|
-
- - '
|
130
|
+
- - '>='
|
129
131
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
132
|
+
version: '0'
|
131
133
|
requirements: []
|
132
134
|
rubyforge_project: artoo-ardrone
|
133
135
|
rubygems_version: 2.0.3
|