publishing pointcloud2 from open3D results unintentional planes

asked 2021-01-22 09:48:56 -0500

mz9i gravatar image

updated 2021-01-27 05:58:45 -0500

My environment

  • OS Version:Ubuntu 18.04.5 LTS (kernel 5.4.0-62-generic)
  • ROS Distro: Melodic
  • RViz version 1.13.15
  • Qt version 5.9.5
  • OGRE version 1.9.0 (Ghadamon)
  • OpenGl version: 4,6 (GLSL 4,6)

My problem:

my project

I am trying to create a pointcloud2 message in Python from an Intel RealSense d435i camera using open3D (v0.10.0.0) library. I send this data in numpy array, through tcp, then a ros node converts from numpy to pointcloud2 and publishes it. Based on this code I wrote my function that converts numpy array to pointcloud2 message. At first, it seems fine because there are no errors. But when I visualize the pointcloud2 topic with RViz, unfortunately there are multiple planes with the same content. Here is the pointcloud correctly and here is from RViz

At first, I had problems with the datatypes, like this but i managed to display at least in this way. I cheched the pointcloud2 message multiple times but i am still not sure if it is correct. What should I modify to be able to visualize correctly?

edit retag flag offensive close merge delete