How to measure distance with realsense
I use realsense ROS wrapper from https://github.com/intel-ros/realsense .
I want to measure the distance of some objects from depth image of /camera/aligned_depth_to_color/image_raw
.
Subscribe /camera/aligned_depth_to_color/image_raw
but data range 0~255.
I can't know the distance from camera to object.
What is a good way to measure the distance from the depth image topic .
rostopic info is:
header:
seq: 0
stamp:
secs: 1542785488
nsecs: 734966992
frame_id: "camera_color_optical_frame"
height: 480
width: 640
encoding: "16UC1"
is_bigendian: 0
step: 1280
data: [62, 7, 62, 7, 62, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 62, 7, 62, 7, 62, 7, 62, 7, 62, 7, 62, 7, 62, 7, 62, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 67, 7, 73, 7, 73, 7, 73, 7, 67, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 73, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 79, 7, 85, 7, 85, 7, 85, 7, 85, 7, 85, 7, ...]
Asked by jetman on 2018-11-26 00:58:55 UTC
Comments
I would really recommend to try and search for this topic on ROS Answers. Use Google:
point cloud distance site:answers.ros.org
.Calculating / deriving distance from point clouds / depth images has been discussed so many times it saves you a lot of waiting on answers.
Asked by gvdhoorn on 2018-11-26 03:45:31 UTC