Skip to content

Commit

Permalink
depth camera update 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 e376e99 commit e9eee44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions people_tracking/src/people_tracking/depth_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def image_callback(self, data, time_data_stored_sec: int = 60):
# self.depth_images.pop(0)

# Store the current image
cv_image = self.bridge.imgmsg_to_cv2(data, desired_encoding='passthrough')
self.depth_images.append([data.header.stamp.secs, cv_image])
# cv_image = self.bridge.imgmsg_to_cv2(data, desired_encoding='passthrough')
self.depth_images.append([data.header.stamp.secs, data])
rospy.loginfo("depth")

# msg = data
Expand Down Expand Up @@ -66,7 +66,7 @@ def get_depth_data(self, data):
# rospy.logwarn("No depth image available.")
# return Image()

return self.bridge.cv2_to_imgmsg(self.depth_images[-1][1], encoding="passthrough")
return data#self.bridge.cv2_to_imgmsg(self.depth_images[-1][1], encoding="passthrough")


if __name__ == '__main__':
Expand Down

0 comments on commit e9eee44

Please sign in to comment.