ruby-player 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2012-04-13 0.5.1
2
+
3
+ * Fixed bugs in XDR array for ActArray, BlobFinder and Ranger classes.
4
+
1
5
  ## 2012-03-21 0.5.0
2
6
 
3
7
  * Log level by default :notice is removed. Use :info.
@@ -134,7 +134,7 @@ module Player
134
134
 
135
135
  debug "Got image size #{state[:width]}x#{state[:height]}"
136
136
 
137
- blob_count = data[2] + data[3]*256
137
+ blob_count = data[2]
138
138
  blob_count.times do |i|
139
139
  blob_data = msg[i*40 + 16, 40].unpack("N9g")
140
140
  fill_hash!(self[i].state, blob_data)
@@ -252,7 +252,7 @@ module Player
252
252
  def set_car(speeds)
253
253
  data = [
254
254
  speeds[:vx] || @state[:vx],
255
- speeds[:a] || @state[:pa]
255
+ speeds[:a] || 0
256
256
  ]
257
257
  send_message(PLAYER_MSGTYPE_CMD, PLAYER_POSITION2D_CMD_CAR, data.pack("GG"))
258
258
  self
@@ -178,11 +178,11 @@ module Player
178
178
 
179
179
 
180
180
  p_count = msg[72,8].unpack("NN")
181
- p_count = p_count[0] + p_count[1] * 256
181
+ p_count = p_count[0]
182
182
  poses = msg[80, 48*p_count].unpack("G" + (6*p_count).to_s)
183
183
 
184
184
  s_count = msg[80 + 48*p_count, 8].unpack("NN")
185
- s_count = s_count[0] + s_count[1] * 256
185
+ s_count = s_count[0]
186
186
  sizes = msg[88 + 48*p_count, 24*s_count].unpack("G" +(3* s_count).to_s)
187
187
 
188
188
  p_count.times do |i|
@@ -13,5 +13,5 @@
13
13
  # GNU General Public License for more details.
14
14
 
15
15
  module Player
16
- VERSION = "0.5.0"
16
+ VERSION = "0.5.1"
17
17
  end
@@ -93,7 +93,7 @@ describe Player::ActArray do
93
93
  end
94
94
 
95
95
  it 'should fill state data' do
96
- state = [2, 0, 1.0, 2.0, 3.0, 4.0, PLAYER_ACTARRAY_ACTSTATE_IDLE,
96
+ state = [2, 2, 1.0, 2.0, 3.0, 4.0, PLAYER_ACTARRAY_ACTSTATE_IDLE,
97
97
  5.0, 6.0, 7.0, 8.0, PLAYER_ACTARRAY_ACTSTATE_MOVING,
98
98
  1]
99
99
 
@@ -109,7 +109,7 @@ describe Player::ActArray do
109
109
  end
110
110
 
111
111
  it 'should get geom by request' do
112
- geom = [2, 0,
112
+ geom = [2, 2,
113
113
  PLAYER_ACTARRAY_TYPE_LINEAR, 2.0, 0.1, 0.2, 0.3, 1.0, 2.0, 3.0, 0.0, 0.5, 1.0, 0.0, 2.0, 0,
114
114
  PLAYER_ACTARRAY_TYPE_ROTARY, 4.0, 1.1, 1.2, 1.3, 1.1, 2.1, 3.1, 0.0, 0.5, 1.0, 1.0, 1.0, 1,
115
115
  0.5, 0.6, 0.7, 1.5, 1.6, 1.7]
@@ -52,7 +52,7 @@ describe Player::BlobFinder do
52
52
  end
53
53
 
54
54
  it 'should fill blobs data' do
55
- blobs = [10, 20, 2, 0,
55
+ blobs = [10, 20, 2, 2,
56
56
  0, 222, 20, 5, 4, 10, 10, 20, 20, 0.5,
57
57
  1, 111, 40, 5, 8, 20, 30, 40, 50, 2.5]
58
58
  msg = blobs.pack("NNNNN9gN9g")
data/spec/ranger_spec.rb CHANGED
@@ -96,8 +96,8 @@ describe Player::Ranger do
96
96
 
97
97
  it 'should get geom by request' do
98
98
  geom = [1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 2.0, 2.0, 2.0,
99
- 2, 0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 2.0, 1.0, 1.0, 0.0, 0.0, -1.0,
100
- 2, 0, 0.5,
99
+ 2, 2, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 2.0, 1.0, 1.0, 0.0, 0.0, -1.0,
100
+ 2, 2, 0.5,
101
101
  0.5, 0.5, 0.5, 0.5, 0.5]
102
102
 
103
103
  msg = geom.pack("G9NNG12NNG6")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-player
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-21 00:00:00.000000000 Z
12
+ date: 2012-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: isna
16
- requirement: &9997220 !ruby/object:Gem::Requirement
16
+ requirement: &20241760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.0.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *9997220
24
+ version_requirements: *20241760
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &9996380 !ruby/object:Gem::Requirement
27
+ requirement: &20239840 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.7'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *9996380
35
+ version_requirements: *20239840
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &9995860 !ruby/object:Gem::Requirement
38
+ requirement: &20238180 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.9'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *9995860
46
+ version_requirements: *20238180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: pry
49
- requirement: &9994940 !ruby/object:Gem::Requirement
49
+ requirement: &20237480 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *9994940
57
+ version_requirements: *20237480
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: yard
60
- requirement: &9994240 !ruby/object:Gem::Requirement
60
+ requirement: &20236500 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *9994240
68
+ version_requirements: *20236500
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: redcarpet
71
- requirement: &9993500 !ruby/object:Gem::Requirement
71
+ requirement: &20235180 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *9993500
79
+ version_requirements: *20235180
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: guard-rspec
82
- requirement: &9993080 !ruby/object:Gem::Requirement
82
+ requirement: &20233600 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *9993080
90
+ version_requirements: *20233600
91
91
  description: Ruby Player - Ruby client library for Player (tools for robots)
92
92
  email:
93
93
  - atimin@gmail.com
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
- rubygems_version: 1.8.17
161
+ rubygems_version: 1.8.15
162
162
  signing_key:
163
163
  specification_version: 3
164
164
  summary: Ruby Player - Ruby client library for Player (tools for robots)