Ask Your Question
0

depth information from Astra camera

asked 2019-04-03 07:54:46 -0600

Yehor gravatar image

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,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-11-05 00:44:39 -0600

Yehor gravatar image

The problem was that I mixed up height and width in the image.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-04-03 07:54:46 -0600

Seen: 68 times

Last updated: Nov 05