Point Cloud to depth information
Hi, I want to retrieve depth of various objects from the point cloud. I am getting point cloud from a stereo camera. All I know is that the z coordinate in point cloud does not corresponds to depth/ distance from stereo camera to object. Thanks in advance.
Please post your tf tree.
link text this is the tf tree generated after executing rosrun tf view_frames
If you are gathering point cloud in one of _optical frames, z coordinate should point forward from the camera. If not, the driver you use may be written disregarding REP-103.
so you mean that z-coordinate would itself give me depth? what would be the units then?
No I don't. To be able to "mean" anything, you need to supply more details (like sensor model, driver you use, topic you listen and message samples etc.). Drivers should follow REP-103 for units but they do not have to.
Are you wanting radial distance, like if you had a ruler from the center of your camera to the object -
distance = sqrt(x^2 + y^2 + z^2)
?Yes it is what I need!!!! @lucasw
I don't think there is an existing node to do that for you- is implementing that equation in your own node unclear or is just having the equation a sufficient answer to this question?