leofeltrin commited on
Commit
e008b57
·
1 Parent(s): 3f2f11e

Adiciona instruções específicas sobre espaçamento de blocos em fileiras (mínimo 0.05) e quantidade exata de blocos

Browse files
prompts/vanilla_task_generation_prompt/cliport_prompt_code_split_template.txt CHANGED
@@ -266,6 +266,9 @@ CRITICAL BASIC SYNTAX AND STRUCTURE:
266
  - **ALWAYS include variable in for loops**: `for i in range(3):` NOT `for in range(3):`
267
  - **Check variable names for typos** - ensure consistency (e.g., `block_urdf` not `blockurdf`)
268
  - **CRITICAL: Follow task description EXACTLY for quantities**: If task says "3 blocks", create EXACTLY 3 blocks, NOT 5 or any other number. Read the task description carefully and match the exact quantity mentioned.
 
 
 
269
  - **NEVER use `p.getQuaternionFromEuler()`** - Instead use `(0, 0, 0, 1)` for default orientation, or `utils.eulerXYZ_to_quatXYZW((0, 0, 0))` if you need to convert from Euler angles
270
 
271
  CRITICAL FOR POSES AND utils.apply():
@@ -306,6 +309,21 @@ CRITICAL FOR POSES AND utils.apply():
306
  - **When using fixed positions (not get_random_pose), ensure they're within workspace bounds**
307
  - **For default orientation, use `(0, 0, 0, 1)` NOT `p.getQuaternionFromEuler([0, 0, 0])`**
308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  CRITICAL FOR PUSH TASKS AND PRIMITIVE NAMING:
310
  - **CRITICAL NAMING**:
311
  - For push: use `primitives.push` (lowercase, no parentheses, it's a function)
 
266
  - **ALWAYS include variable in for loops**: `for i in range(3):` NOT `for in range(3):`
267
  - **Check variable names for typos** - ensure consistency (e.g., `block_urdf` not `blockurdf`)
268
  - **CRITICAL: Follow task description EXACTLY for quantities**: If task says "3 blocks", create EXACTLY 3 blocks, NOT 5 or any other number. Read the task description carefully and match the exact quantity mentioned.
269
+ - Count the number in the task description: "3 blocks" = 3, "five blocks" = 5, "a row of 3" = 3
270
+ - Use `for _ in range(3):` for exactly 3 blocks, `for _ in range(5):` for exactly 5 blocks, etc.
271
+ - DO NOT assume or guess the quantity - read it from the task description
272
  - **NEVER use `p.getQuaternionFromEuler()`** - Instead use `(0, 0, 0, 1)` for default orientation, or `utils.eulerXYZ_to_quatXYZW((0, 0, 0))` if you need to convert from Euler angles
273
 
274
  CRITICAL FOR POSES AND utils.apply():
 
309
  - **When using fixed positions (not get_random_pose), ensure they're within workspace bounds**
310
  - **For default orientation, use `(0, 0, 0, 1)` NOT `p.getQuaternionFromEuler([0, 0, 0])`**
311
 
312
+ CRITICAL FOR ROWS AND BLOCK SPACING:
313
+ - **Block size is (0.04, 0.04, 0.04)** - blocks are 0.04 units in each dimension
314
+ - **Minimum spacing between blocks**: Use at least **0.05** spacing to prevent overlapping
315
+ - CORRECT for a row of 3 blocks: `offsets = [(-0.05, 0, 0.02), (0, 0, 0.02), (0.05, 0, 0.02)]` (spacing of 0.05)
316
+ - CORRECT for a row of 5 blocks: `offsets = [(-0.10, 0, 0.02), (-0.05, 0, 0.02), (0, 0, 0.02), (0.05, 0, 0.02), (0.10, 0, 0.02)]` (spacing of 0.05)
317
+ - WRONG: `offsets = [(-0.04, 0, 0), (0, 0, 0), (0.04, 0, 0)]` - spacing of 0.04 will cause blocks to overlap
318
+ - WRONG: `offsets = [(-0.06, 0, 0), (0, 0, 0), (0.06, 0, 0)]` - spacing of 0.06 is acceptable but 0.05 is standard
319
+ - **For horizontal rows, use Y offsets**: `offsets = [(0, -0.05, 0.02), (0, 0, 0.02), (0, 0.05, 0.02)]`
320
+ - **For vertical rows, use X offsets**: `offsets = [(-0.05, 0, 0.02), (0, 0, 0.02), (0.05, 0, 0.02)]`
321
+ - **Pattern for N blocks in a row**:
322
+ - Calculate spacing: `spacing = 0.05 * (N - 1) / 2` for symmetric distribution, or use fixed 0.05 spacing
323
+ - For 3 blocks: center at 0, left at -0.05, right at +0.05
324
+ - For 5 blocks: center at 0, then -0.10, -0.05, 0, +0.05, +0.10
325
+ - **Z coordinate for blocks on table**: Use `0.02` (half of block height 0.04) to place blocks on table surface
326
+
327
  CRITICAL FOR PUSH TASKS AND PRIMITIVE NAMING:
328
  - **CRITICAL NAMING**:
329
  - For push: use `primitives.push` (lowercase, no parentheses, it's a function)