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

How can i get x y z coordinates of pointcloud from a point (x,y) of color image D435

asked 2021-01-04 20:55:44 -0500

NhatHuy gravatar image

Hi all, I'm using object detection on color image and i have a point (x,y), it is center bounding box of object. From this point, I want to get x y z coordinates of this point from pointcloud. I have used this function to get data: point_cloud2.read_points(data,field_names=('x', 'y', 'z'),skip_nans=True,uvs=[(x,y)]) But shape of pointcloud data is 160x120 while shape of color image is 640x480. How can I get more data from pointcloud to shape is 640x480. Thank you all!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-01-15 06:29:55 -0500

Ranjit Kathiriya gravatar image

updated 2021-01-15 06:30:39 -0500

Hello @NhatHuy,

Refer to this post, You will find your answer, and at the end of the post click on "Show more comments" You will be able to get Z location from the point cloud.

https://answers.ros.org/question/3678...

Check this python code for demo:

https://github.com/osrf/baxter_demos/...

edit flag offensive delete link more

Comments

Respected Sir, I am working on Ubunto 20.4 with ROS noetic. I am having intel Real sense D415 camera by which I can visualize the point cloud on Rviz.

I want to get xyz coordinates of each pointcloud and from that I want to separate and print min and max point xyz coordinates.

I am very much new to ROS and doesn't have good programming experience as well. I will be very much thankful if anyone can share me any sample code or guide me step by step as i have searched almost all ROS forums but didn't get my answer.

I also asked a ques can you plz help me out https://answers.ros.org/question/3790...

arifzaman gravatar image arifzaman  ( 2021-05-26 18:10:29 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-01-04 20:55:44 -0500

Seen: 1,509 times

Last updated: Jan 15 '21