How to Access Point Cloud Data from Sensor in Isaac Sim with NvBlox?

Isaac Sim Version

4.0.0

Operating System

Ubuntu 22.04

GPU Information

  • Model: RTX 4070 Laptop
  • Driver Version: 535.183.01

Description

Hi everyone,

I’m working through the Isaac Sim + NvBlox tutorial, specifically the reconstruction with ROS2 integration. I’ve successfully set up the simulation and launched the rviz to reconstruct the env. However, I’m having trouble figuring out how to access the point cloud data from the sensors (e.g., 3D LiDAR or cameras).

I want to consume the point cloud data live when the robot is moving in a ROS2 topic so I can use it in another process. Could anyone guide me on how to retrieve and subscribe to the point cloud data from the sensor topics? Are there specific ROS2 topics or services I should be looking at for this?

I have followed the tutorial along and have reached

Please let me know how to proceed.
Thanks in advance!

EDIT:

I found that /front_3d_lidar/point_cloud topic has the points and was able to echo it with ros2 topic echo /front_3d_lidar/point_cloud, my question is how do I get it in [x,y,z,i] format from the code. I did see a code where it did get_cloud_point which can get me the points but I am not able to find that in examples.

Hey @engineer.ambarishgk.

It depends on which sensor data you would like to use to convert to point cloud data. Like you said, there are two types of sensor data you can consume: lidar and camera.

In this nvblox example, the nvblox node is using depth images (ground truth) from the stereo camera to generate ESDF. If you do ros2 topic info /front_stereo_camera/depth/ground_truth, you can see that the message type is sensor_msgs::Image (link). The 3D lidar data is not being consumed in this example but feel free to use it if it satisfies your needs. The data type of the lidar data is sensor_msgs::PointCloud2 (link).

You mentioned that you would like to use [x,y,z,i] format. Could you please specify the data type you want to use? I think the closest one would be pcl::PointCloud<pcl::PointXYZI> (link).

You can refer to this tutorial on how to do the conversion between sensor_msgs::PointCloud2 and pcl::PointCloud<T>.

As for the conversion between sensor_msgs::Image and pcl::PointCloud<T>, I don’t know any handy packages or functions you can use. I found this post from ROS community and looks like you need to implement your own conversion function.

I am not sure if you are interested in using the point cloud data generated by nvblox node. If so, you can look into topic /nvblox_node/static_esdf_pointcloud which has data type sensor_msgs::PointCloud2.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.