Skip to content

Commit

Permalink
save data fix 3
Browse files Browse the repository at this point in the history
Signed-off-by: Ken Haagh <[email protected]>
  • Loading branch information
KenH2 committed Dec 14, 2023
1 parent 4340f42 commit e379323
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion people_tracking/src/people_tracking/person_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def process_latest_image(self):
cropped_image = cv_image[y1:y2, x1:x2]
image_message = self.bridge.cv2_to_imgmsg(cropped_image, encoding="passthrough")

if depth_camera and cv_depth_image is not None:
if depth_camera:
mask_depth = np.zeros_like(cv_depth_image, dtype=np.uint8)
cv2.fillPoly(mask_depth, [seg], (255, 255, 255))

Expand Down Expand Up @@ -182,6 +182,7 @@ def process_latest_image(self):
x_positions = [x_positions[i] for i in sorted_idx]
y_positions = [y_positions[i] for i in sorted_idx]
z_positions = [z_positions[i] for i in sorted_idx]
rospy.loginfo(f"z: {z_positions}")

# Create and Publish person_detections msg
msg = DetectedPerson()
Expand Down

0 comments on commit e379323

Please sign in to comment.