Add notebook to compute mean metrics
This commit is contained in:
parent
66cbf39516
commit
133fc18d4d
@ -2,7 +2,7 @@
|
|||||||
<launch>
|
<launch>
|
||||||
<arg name="launch_rviz" default="true" />
|
<arg name="launch_rviz" default="true" />
|
||||||
|
|
||||||
<rosparam command="load" file="$(find active_grasp)/config/active_grasp.yaml" subst_value="true" />
|
<rosparam command="load" file="$(find active_grasp)launch/active_grasp.yaml" subst_value="true" />
|
||||||
|
|
||||||
<param name="robot_description" command="$(find xacro)/xacro $(find active_grasp)/assets/urdfs/panda_arm_hand.urdf.xacro" />
|
<param name="robot_description" command="$(find xacro)/xacro $(find active_grasp)/assets/urdfs/panda_arm_hand.urdf.xacro" />
|
||||||
<node pkg="active_grasp" type="bt_sim_node.py" name="bt_sim" output="screen" />
|
<node pkg="active_grasp" type="bt_sim_node.py" name="bt_sim" output="screen" />
|
||||||
|
25
notebooks/print_metrics.py
Normal file
25
notebooks/print_metrics.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#%%
|
||||||
|
import pandas as pd
|
||||||
|
|
||||||
|
#%%
|
||||||
|
logfile = "../logs/210712-132211_policy=top.csv"
|
||||||
|
df = pd.read_csv(logfile)
|
||||||
|
|
||||||
|
#%%
|
||||||
|
metrics = [
|
||||||
|
("Runs", len(df.index)),
|
||||||
|
("", ""),
|
||||||
|
("Succeeded", (df.result == "succeeded").sum()),
|
||||||
|
("Failed", (df.result == "failed").sum()),
|
||||||
|
("Aborted", (df.result == "aborted").sum()),
|
||||||
|
("", ""),
|
||||||
|
("Success rate", round((df.result == "succeeded").mean(), 2)),
|
||||||
|
("Mean time", round(df.exploration_time.mean(), 2)),
|
||||||
|
("Mean distance", round(df.distance_travelled.mean(), 2)),
|
||||||
|
("Mean viewpoints", round(df.viewpoint_count.mean())),
|
||||||
|
]
|
||||||
|
|
||||||
|
for k, v in metrics:
|
||||||
|
print("{:<16} {:>8}".format(k, v))
|
||||||
|
|
||||||
|
# %%
|
Loading…
x
Reference in New Issue
Block a user