Spaces:
Running on Zero
Running on Zero
Bin on the robot's right as in most community pick-and-place data
Browse files
sim.py
CHANGED
|
@@ -28,15 +28,15 @@ COLORS = {
|
|
| 28 |
SCENES = {
|
| 29 |
"Cubes and tray": {
|
| 30 |
"objects": [
|
| 31 |
-
("red", "cube", (0.
|
| 32 |
-
("blue", "cube", (0.
|
| 33 |
-
("yellow", "cube", (0.
|
| 34 |
],
|
| 35 |
-
"tray": (0.
|
| 36 |
},
|
| 37 |
"Single cube": {
|
| 38 |
-
"objects": [("red", "cube", (0.
|
| 39 |
-
"tray": (0.
|
| 40 |
},
|
| 41 |
"Blocks without tray": {
|
| 42 |
"objects": [
|
|
@@ -106,9 +106,9 @@ def scene_xml(scene):
|
|
| 106 |
<geom name="board" type="box" pos="0.22 0 -0.004" size="0.26 0.32 0.004" material="cork" friction="1 0.01 0.001"/>
|
| 107 |
<geom name="wall" type="box" pos="-0.35 0 0.4" size="0.01 1.2 0.5" material="wall" contype="0" conaffinity="0"/>
|
| 108 |
<geom name="wall2" type="box" pos="0.3 0.75 0.4" size="1.0 0.01 0.5" material="wall" contype="0" conaffinity="0"/>
|
| 109 |
-
<camera name="scene" pos="0.30
|
| 110 |
-
<camera name="overview" pos="0.40
|
| 111 |
-
<body name="scene_target" pos="0.17 0.04 0.02"/>
|
| 112 |
{objects}
|
| 113 |
{tray}
|
| 114 |
</worldbody>
|
|
|
|
| 28 |
SCENES = {
|
| 29 |
"Cubes and tray": {
|
| 30 |
"objects": [
|
| 31 |
+
("red", "cube", (0.20, 0.0), 0.0),
|
| 32 |
+
("blue", "cube", (0.25, 0.09), 0.4),
|
| 33 |
+
("yellow", "cube", (0.16, 0.11), 0.9),
|
| 34 |
],
|
| 35 |
+
"tray": (0.24, -0.16),
|
| 36 |
},
|
| 37 |
"Single cube": {
|
| 38 |
+
"objects": [("red", "cube", (0.20, -0.01), 0.3)],
|
| 39 |
+
"tray": (0.24, -0.16),
|
| 40 |
},
|
| 41 |
"Blocks without tray": {
|
| 42 |
"objects": [
|
|
|
|
| 106 |
<geom name="board" type="box" pos="0.22 0 -0.004" size="0.26 0.32 0.004" material="cork" friction="1 0.01 0.001"/>
|
| 107 |
<geom name="wall" type="box" pos="-0.35 0 0.4" size="0.01 1.2 0.5" material="wall" contype="0" conaffinity="0"/>
|
| 108 |
<geom name="wall2" type="box" pos="0.3 0.75 0.4" size="1.0 0.01 0.5" material="wall" contype="0" conaffinity="0"/>
|
| 109 |
+
<camera name="scene" pos="0.30 0.37 0.35" mode="targetbody" target="scene_target" fovy="58"/>
|
| 110 |
+
<camera name="overview" pos="0.40 0.52 0.46" mode="targetbody" target="scene_target" fovy="50"/>
|
| 111 |
+
<body name="scene_target" pos="0.17 -0.04 0.02"/>
|
| 112 |
{objects}
|
| 113 |
{tray}
|
| 114 |
</worldbody>
|