Skip to content

Commit

Permalink
Deleting previous HoC detections
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguelmelon committed May 28, 2024
1 parent 9b32631 commit f62ce47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions people_tracking_v2/scripts/comparison_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ def compare_data(self):
if not self.latest_hoc_vectors or self.latest_pose_data is None or self.saved_pose_data is None:
return

for hoc_vector in self.latest_hoc_vectors:
for i, hoc_vector in enumerate(self.latest_hoc_vectors):
# Compare HoC data
hue_vector = hoc_vector.hue_vector
sat_vector = hoc_vector.sat_vector
hoc_distance_score = self.compute_hoc_distance_score(hue_vector, sat_vector)
rospy.loginfo(f"HoC Distance score for detection: {hoc_distance_score}")
rospy.loginfo(f"Detection #{i+1}: HoC Distance score: {hoc_distance_score}")

# Compare pose data
left_shoulder_hip_distance = self.latest_pose_data.left_shoulder_hip_distance
Expand All @@ -94,6 +94,9 @@ def compare_data(self):

# Publish debug information
self.publish_debug_info(hoc_distance_score, pose_distance_score)

# Clear the latest HoC vectors after processing
self.latest_hoc_vectors.clear()

def compute_hoc_distance_score(self, hue_vector, sat_vector):
"""Compute the distance score between the current detection and saved data (HoC)."""
Expand Down
Empty file.

0 comments on commit f62ce47

Please sign in to comment.