Hello,
I am trying to get the distance to the defined object by using Astra camera with /camera/depth/image_raw topic. By using OpenCV library and RGB image from topic /camera/rgb/image_raw I have defined the object and get the center position of the object. Now I want to get the distance to that center, I read that the depth_image with 32FC1
encoding from depth topic gives you the distance of each pixel in meters. But when I am trying to do that in that way:
depth = depth_image[self.position[0], self.position[1]]
I got strange value like 1169 or the values which are very close to it regardless of the distance.
Could someone help me regards,
Originally posted by Yehor on ROS Answers with karma: 166 on 2019-04-03
Post score: 0