Skip to content

Commit b6643ab

Browse files
author
Shushman Choudhury
committed
Block naming
1 parent 44e4d73 commit b6643ab

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/prpy/perception/block_detector.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,11 @@ def DetectBlocks(self, robot, table, blocks=None,timeout=10, **kw_args):
164164
ay = 0
165165
block_in_world_corrected = euler_matrix(ax,ay,az)
166166
block_in_world[0:3,0:3] = block_in_world_corrected[0:3,0:3]
167-
168-
169-
#Set block name - should we change?
170167
block.SetTransform(block_in_world)
171-
valid = False
172-
while not valid:
173-
rand_name = 'block' + `int(numpy.random.randint(1,10000))`
174-
valid = env.GetKinBody(rand_name) is None
175168

176-
block.SetName(rand_name)
177-
env.Add(block)
169+
#Set block name
170+
block.SetName('block')
171+
env.Add(block,anonymous=True)
178172
blocks.append(block)
179173

180174
return blocks

0 commit comments

Comments
 (0)