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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90ff1f3261696e8553da95dac0ddc97fca6f1e4c
4
- data.tar.gz: a536d02fdf1a1c73891bb02b2de70ed10e4c011a
3
+ metadata.gz: 37ac5db8e1d48c16c99f52fcf9f1ca95f1d41ba6
4
+ data.tar.gz: f2fec1d9c38c032146bf68f7abd1208048ff10a0
5
5
  SHA512:
6
- metadata.gz: 5c7e4f7cd91b52a6f7ac83dfadbf83c2f447d2bce05f55cf177ff30aa652fbb2d6f94e6d36f9ec7842ed2f636f6075028f85799c779e87f1f8c5d925e201e5d1
7
- data.tar.gz: d7fea985f01812115bfeb6854a4f1f0d7d7792b081b36046d37cf68259d21125fcd7bb4425d4cf9cc6749c4db1f592a07a754cae99687848be8dfba34e010f80
6
+ metadata.gz: 85a8b807a06a9363c3d5e22e13d97efd6035e78b91a244e7cb9975942c571afaf44afcd5db2c315b28e1b7659da13470363db9a78644fd3eb19f3f7a4a12b7f1
7
+ data.tar.gz: a70c856b41380eabb89274f492ca445324cfc1de1efe8c8a0d7fd10c9d24704a74abe4a531bc1d8fb738c1486a644f4d100a401f7f801873835e1e2d563b5a9f
@@ -1,33 +1,31 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- artoo-ardrone (1.0.2.pre)
5
- artoo (~> 1.1.0.pre)
6
- hybridgroup-argus (~> 0.4.0)
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
- artoo (1.1.0.pre)
12
- celluloid (~> 0.15.0.pre2)
13
- celluloid-io (~> 0.15.0.pre2)
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.0.pre2)
20
- timers (>= 1.0.0)
21
- celluloid-io (0.15.0.pre2)
22
- celluloid (>= 0.15.0.pre)
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.4.0)
27
- certified
26
+ http (0.5.0.pre)
28
27
  http_parser.rb
29
- http_parser.rb (0.5.3)
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.pre)
46
- celluloid-io (>= 0.8.0)
47
- http (>= 0.2.0)
48
- http_parser.rb (>= 0.5.3)
49
- rack (>= 1.4.0)
50
- websocket_parser (>= 0.1.2)
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)
@@ -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.pre'
23
- s.add_runtime_dependency 'hybridgroup-argus', '~> 0.4.0'
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
@@ -1,5 +1,5 @@
1
1
  module Artoo
2
2
  module Ardrone
3
- VERSION = '1.0.2.pre'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  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?(::Argus)
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?(::Argus)
14
- @ardrone = Argus::NavStreamer.new(socket: connect_to_udp, host: port.host, port: port.port.to_i)
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?(::Argus)
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, :front_camera, :bottom_camera, :up, :down, :left, :right, :forward, :backward, :turn_left, :turn_right].freeze
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.2.pre
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-08-31 00:00:00.000000000 Z
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.pre
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.pre
27
+ version: 1.1.0
28
28
  - !ruby/object:Gem::Dependency
29
- name: hybridgroup-argus
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: 1.3.1
132
+ version: '0'
131
133
  requirements: []
132
134
  rubyforge_project: artoo-ardrone
133
135
  rubygems_version: 2.0.3