def parse_parameter(self, testblock_name, params):
"""
Method that returns the metric method with the given parameter.
:param params: Parameter
"""
metrics = []
if type(params) is not list:
rospy.logerr("metric config not a list")
return False
for metric in params:
# check for optional parameters
try:
groundtruth = metric["groundtruth"]
groundtruth_epsilon = metric["groundtruth_epsilon"]
except (TypeError, KeyError):
rospy.logwarn("No groundtruth parameters given, skipping groundtruth evaluation for metric 'path_length' in testblock '%s'", testblock_name)
groundtruth = None
groundtruth_epsilon = None
metrics.append(CalculatePathLength(metric["root_frame"], metric["measured_frame"], groundtruth, groundtruth_epsilon))
return metrics
评论列表
文章目录