Skip to content

Commit

Permalink
Correct depth criterion used
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguelmelon committed Jun 28, 2024
1 parent 89bd5c5 commit 85f3cb0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion people_tracking_v2/scripts/comparison_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def sync_callback(self, hoc_array, pose_array):

head_feet_distance = pose_msg.head_feet_distance
if head_feet_distance < 0:
rospy.loginfo(f"Skipping comparison for Detection ID {hoc_msg.id} due to negative pose distance")
rospy.loginfo(f"Skipping pose comparison for Detection ID {hoc_msg.id} due to negative pose distance")
comparison_scores_msg.pose_distance_score = -1
else:
distance_score = self.compute_distance(head_feet_distance, self.operator_pose_median)
Expand Down
2 changes: 1 addition & 1 deletion people_tracking_v2/scripts/decision_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def sync_callback(self, comparison_msg, detection_msg):
# Define thresholds
iou_threshold = 0.8
hoc_threshold = 0.45
pose_threshold = 0.5 # Example threshold for pose distance
pose_threshold =0.1 # Example threshold for pose distance

iou_detections = []
hoc_pose_detections = []
Expand Down
3 changes: 2 additions & 1 deletion people_tracking_v2/scripts/yolo_seg.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ def image_callback(self, data):
x_center = int((box[0] + box[2]) / 2)
y_center = int((box[1] + box[3]) / 2)
depth_value = cv_depth_image[y_center, x_center]
detection.depth = float(depth_value) if depth_value <= 10 else -1.0
detection.depth = float(depth_value) if depth_value > 0 else -1.0
rospy.loginfo(f"Detection {detection.id}: Depth value: {depth_value}")
else:
detection.depth = -1.0 # Use -1.0 as a placeholder if depth is not available

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<launch>

<arg name="laptop" default="True" />
<arg name="depth_camera" default="False" />
<arg name="depth_camera" default="True" />
<arg name="save_data" default="False"/>

<node
Expand Down

0 comments on commit 85f3cb0

Please sign in to comment.