Print nbv-grasp times

This commit is contained in:
Michel Breyer 2021-11-11 17:23:38 +01:00
parent fb69de24ef
commit ed29ebae58

View File

@ -24,13 +24,11 @@
"source": [
"logfile = \"\"\n",
"\n",
"###\n",
"\n",
"df = pd.read_csv(logfile)\n",
"\n",
"n_attempts = len(df.index)\n",
"n_succeeded = (df.result == \"succeeded\").sum()\n",
"n_failed = (df.result == \"failed\").sum()\n",
"n_failed = ((df.result == \"failed\") | (df.result == \"no_motion_plan_found\")).sum()\n",
"n_aborted = (df.result == \"aborted\").sum()\n",
"views_mean = df.view_count.mean()\n",
"views_std = df.view_count.std()\n",
@ -42,6 +40,52 @@
"print(f\"${n_succeeded}$ & ${n_failed}$ & ${n_aborted}$ & ${views_mean:.1f} \\pm {views_std:.1f}$ & ${search_time_mean:.2f} \\pm {search_time_std:.2f}$ & ${grasp_time_mean:.2f} \\pm {grasp_time_std:.2f}$\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"How often does it fail because no motion plan was found?\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print((df.result == \"no_motion_plan_found\").sum())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Compute timings"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"view_generation = df.view_generation / df.view_count\n",
"state_update = df.state_update / df.view_count\n",
"tsdf_update = df.tsdf_integration / df.view_count\n",
"grasp_prediction = df.grasp_prediction / df.view_count\n",
"grasp_selection = df.grasp_selection / df.view_count\n",
"ig_computation = df.ig_computation / df.view_count\n",
"\n",
"print(f\"View generation: {view_generation.mean():.3f}\")\n",
"print(f\"State update: {state_update.mean():.3f}\")\n",
"print(f\" TSDF update: {tsdf_update.mean():.3f}\")\n",
"print(f\" Grasp prediction: {grasp_prediction.mean():.3f}\")\n",
"print(f\" Grasp selection: {grasp_selection.mean():.3f}\")\n",
"print(f\"IG computation: {ig_computation.mean():.3f}\")\n",
"print(\"---\")\n",
"print(f\"Total time: {view_generation.mean() + state_update.mean() + ig_computation.mean():.3f}\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,