File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
kf_hungarian_tracker/kf_hungarian_tracker Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,15 @@ def callback(self, msg):
9797 try :
9898 trans = self .tf_buffer .lookup_transform (self .global_frame , msg .header .frame_id , rclpy .time .Time ())
9999 msg .header .frame_id = self .global_frame
100+ # do_transform_vector3(vector, trans) resets trans.transform.translation
101+ # values to 0.0, so we need to preserve them for future usage in the loop below
102+ translation_backup_x = trans .transform .translation .x
103+ translation_backup_y = trans .transform .translation .y
104+ translation_backup_z = trans .transform .translation .z
100105 for i in range (len (detections )):
106+ trans .transform .translation .x = translation_backup_x
107+ trans .transform .translation .y = translation_backup_y
108+ trans .transform .translation .z = translation_backup_z
101109 # transform position (point)
102110 p = PointStamped ()
103111 p .point = detections [i ].position
You can’t perform that action at this time.
0 commit comments