Skip to content

Commit 1f6caca

Browse files
authored
Merge pull request #3 from RobotLocomotion/prm_comparison_tweaks
tweak PRM comparison
2 parents df11235 + afe3811 commit 1f6caca

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

reproduction/prm_comparison/prm_comparison.ipynb

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"outputs": [],
6464
"source": [
6565
"SEED = 0\n",
66-
"np.random.seed(SEED)"
66+
"np.random.seed(SEED)\n",
67+
"CORE_CNT = mp.cpu_count() # you may edit this."
6768
]
6869
},
6970
{
@@ -142,12 +143,34 @@
142143
]
143144
},
144145
{
146+
"attachments": {},
147+
"cell_type": "markdown",
148+
"metadata": {},
149+
"source": [
150+
"# Load pre-generated regions"
151+
]
152+
},
153+
{
154+
"cell_type": "code",
155+
"execution_count": null,
156+
"metadata": {},
157+
"outputs": [],
158+
"source": [
159+
"#load regions\n",
160+
"with open(os.path.join(GcsDir(), \"data/prm_comparison/IRIS.reg\"), \"rb\") as f:\n",
161+
" regions = pickle.load(f)"
162+
]
163+
},
164+
{
145165
"attachments": {},
146166
"cell_type": "markdown",
147167
"metadata": {},
148168
"source": [
149-
"# Generate IRIS Regions\n",
150-
"### via manual seeds"
169+
"# Or Regenerate IRIS Regions\n",
170+
"\n",
171+
"Note: This IRIS region computation is slow. We give the option to load the pre-generated regions in the cells below; in which case you can skip this step.\n",
172+
"\n",
173+
"## via manual seeds"
151174
]
152175
},
153176
{
@@ -162,8 +185,7 @@
162185
"iris_options.termination_threshold = -1\n",
163186
"iris_options.relative_termination_threshold = 0.02\n",
164187
"iris_options.num_collision_infeasible_samples = 1\n",
165-
"iris_options.random_seed = SEED\n",
166-
"CORE_CNT = mp.cpu_count() # you may edit this."
188+
"iris_options.random_seed = SEED\n"
167189
]
168190
},
169191
{
@@ -218,22 +240,10 @@
218240
]
219241
},
220242
{
221-
"attachments": {},
222243
"cell_type": "markdown",
223244
"metadata": {},
224245
"source": [
225-
"## Or load pre-generated regions"
226-
]
227-
},
228-
{
229-
"cell_type": "code",
230-
"execution_count": null,
231-
"metadata": {},
232-
"outputs": [],
233-
"source": [
234-
"#load regions\n",
235-
"with open(os.path.join(GcsDir(), \"data/prm_comparison/IRIS.reg\"), \"rb\") as f:\n",
236-
" regions = pickle.load(f)"
246+
"# Create the GCS Trajectory Optimization"
237247
]
238248
},
239249
{
@@ -335,7 +345,7 @@
335345
"cell_type": "markdown",
336346
"metadata": {},
337347
"source": [
338-
"## Generate PRM"
348+
"## Or Generate PRM"
339349
]
340350
},
341351
{

0 commit comments

Comments
 (0)