ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

how to access depth values form /camera/depth/image_raw?? [closed]

asked 2014-04-08 23:10:36 -0500

hunterkaushik gravatar image

updated 2016-10-24 09:03:07 -0500

ngrennan gravatar image

Hey ,

i am using ros hydro and ubuntu 12.04 (LTS) , i need to know how to convert the 8-bit depth data which i receive from kinect in the topic /camera/depth/image_raw to depth of individual points in mm . i know that we have to use encoding and is_bigendian values , but i dont know how to use them . can someone please guide me how to use them .

Note: i didnt want to use point cloud data type because it was a bit complicated when compared to /camera/depth/image_raw and i only need depth data , so i thought this was better . if you feel that in order to access depth data point clouds are better please guide me how to obtain the depth data from point cloud .

Thank you for your patience .

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by hunterkaushik
close date 2014-04-22 02:52:43


no , i want to know how to get the values x,y,z in the first place , also the time taken for my robot to read point cloud data is very high like 4sec difference between one input and the other , how do i rectify it ?? please help me out .

hunterkaushik gravatar image hunterkaushik  ( 2014-04-09 02:14:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-04-10 09:09:09 -0500

Wolf gravatar image
edit flag offensive delete link more


it works perfect for /camera/depth/image_raw rostopic.

askkvn gravatar image askkvn  ( 2021-06-25 00:27:45 -0500 )edit

My answer with complete code (c++) :

askkvn gravatar image askkvn  ( 2021-06-25 01:27:15 -0500 )edit

Question Tools

1 follower


Asked: 2014-04-08 23:10:36 -0500

Seen: 3,365 times

Last updated: Apr 10 '14