Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#3 from RobotLocomotion/prm_compari…
Browse files Browse the repository at this point in the history
…son_tweaks

tweak PRM comparison
  • Loading branch information
RussTedrake authored Oct 15, 2023
2 parents df11235 + afe3811 commit 1f6caca
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions reproduction/prm_comparison/prm_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"outputs": [],
"source": [
"SEED = 0\n",
"np.random.seed(SEED)"
"np.random.seed(SEED)\n",
"CORE_CNT = mp.cpu_count() # you may edit this."
]
},
{
Expand Down Expand Up @@ -142,12 +143,34 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Load pre-generated regions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#load regions\n",
"with open(os.path.join(GcsDir(), \"data/prm_comparison/IRIS.reg\"), \"rb\") as f:\n",
" regions = pickle.load(f)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"# Generate IRIS Regions\n",
"### via manual seeds"
"# Or Regenerate IRIS Regions\n",
"\n",
"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",
"\n",
"## via manual seeds"
]
},
{
Expand All @@ -162,8 +185,7 @@
"iris_options.termination_threshold = -1\n",
"iris_options.relative_termination_threshold = 0.02\n",
"iris_options.num_collision_infeasible_samples = 1\n",
"iris_options.random_seed = SEED\n",
"CORE_CNT = mp.cpu_count() # you may edit this."
"iris_options.random_seed = SEED\n"
]
},
{
Expand Down Expand Up @@ -218,22 +240,10 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Or load pre-generated regions"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#load regions\n",
"with open(os.path.join(GcsDir(), \"data/prm_comparison/IRIS.reg\"), \"rb\") as f:\n",
" regions = pickle.load(f)"
"# Create the GCS Trajectory Optimization"
]
},
{
Expand Down Expand Up @@ -335,7 +345,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Generate PRM"
"## Or Generate PRM"
]
},
{
Expand Down

0 comments on commit 1f6caca

Please sign in to comment.