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

How to validate [x,y,z] in .pcd file?

asked 2016-04-05 23:59:57 -0500

skt9 gravatar image

A stereo camera setup has been realized using 2 usb cameras. The pointcloud is being generated as /stereo/points2 topic(using stereo_image_proc). When I generate a pcd file using the command rosrun pcl_ros pointcloud_to_pcd, I get a pcd file with a lot of Nan values. Pls answer the following questions related to pcd -

  1. Is it Ok to get many Nan values for [x,y,z]? Or is there a problem with calibration (cameracalibrator.py has been used)?
  2. For a given frame, how to know the origin (0,0,0)?
  3. Are the [x,y,z] values we get in pcd file in meters?Is it the real world distance of each point from the camera frame?
  4. We have got erroneous results for z values. What might be wrong? (We are checking it with known depth values)

Thank You

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-04-06 11:21:32 -0500

lucasw gravatar image

updated 2016-04-06 11:22:13 -0500

  1. Not sure about this one.

  2. The origin is likely at a center of focus somewhere behind the lens of one of the two cameras. I'm not very familiar with stereo operation but I believe one camera is primary and the other has an offset relative to it (the other possibility is that the origin is midway between the two cameras).

    You have to experimentally figure out where the origin is relative to the physical camera bodies- maybe using a fixture with a calibration target. Check out ROS Industrial extrinsic calibration http://wiki.ros.org/industrial_extrin... .

  3. The reported distance ought to be consistent with the units provided about the calibration target. If you told calibration meters, you should be measuring in meters.

  4. Try measuring a calibration target (like a chessboard/checkerboard or circle grid). You can get the distance to the target from a single calibrated camera (either using opencv or maybe there is a chessboard finding ros node available), and compare that to the stereo generated points distance. Both those processes use the same camera calibrations so ought to be consistent with each other even if not consistent with independently measured distances, which would indicate problems elsewhere.

edit flag offensive delete link more

Comments

Thanks for the reply. Just to confirm, "in no case the value of [x,y,z] in pcd file is other than the standard measurements(cm,m etc)?". What i mean is [x,y,z] is never encoded in any other format, right?

skt9 gravatar image skt9  ( 2016-04-06 22:14:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-05 23:58:15 -0500

Seen: 839 times

Last updated: Apr 06 '16