Gazebo | Ignition | Community
Ask Your Question

depth value of openni_camera

asked 2017-08-01 06:57:55 -0500

Akitoshi gravatar image

Hello. I am doing simulation using openni_camera( on Gazebo. I'd like to get the depth value of real type, but uint8[] will return as shown by document( Since 4 data was stored for one point, I converted it to float32 using union, but we could not get the correct value. What do these four data represent? Also, how can we obtain the depth value? Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-08-01 10:17:12 -0500

iche033 gravatar image

there are a few related questions and answers in ROS answers, e.g.

I'm not sure what you mean by 4 data stored per point, maybe RGBD? The depth image topic will give you D. After converting to float32, you get depth values so there'll be a total of width*height values.

edit flag offensive delete link more


Thank @iche033! Thanks to the URL you sent, I was able to solve it! Perhaps one depth value was converted to four data, but I did not know how to reprocess the original data. However, I were able to obtain depth values by using openCV!

Akitoshi gravatar imageAkitoshi ( 2017-08-02 05:37:44 -0500 )edit

Question Tools

1 follower


Asked: 2017-08-01 06:57:55 -0500

Seen: 841 times

Last updated: Aug 01 '17