def __init__(self, root_frame, measured_frame, groundtruth, groundtruth_epsilon):
"""
Class for calculating the distance covered by the given frame in relation to a given root frame.
The tf data is sent over the tf topic given in the robot_config.yaml.
:param root_frame: name of the first frame
:type root_frame: string
:param measured_frame: name of the second frame. The distance will be measured in relation to the root_frame.
:type measured_frame: string
"""
self.active = False
self.root_frame = root_frame
self.measured_frame = measured_frame
self.path_length = 0.0
self.tf_sampling_freq = 20.0 # Hz
self.first_value = True
self.trans_old = []
self.rot_old = []
self.groundtruth = groundtruth
self.groundtruth_epsilon = groundtruth_epsilon
self.finished = False
self.listener = tf.TransformListener()
rospy.Timer(rospy.Duration.from_sec(1 / self.tf_sampling_freq), self.record_tf)
评论列表
文章目录