I can success to get the Point cloud data on rtx_lidar.py demo based on below link with IsaacSim2022.2.1.
Thank you!
I can get the Point cloud 3D-raw data like below.
But I cannot get the Point cloud data with IsaacSim2023.1.1 from this link guide.
I found ActionGraph Structure is changed on IsaacSim2023.1.1,
Then I tried to change the code like below for new ActionGraph Structure of IsaacSim2023.1.1.
The PointCloudData output is now called ‘data’ to standardize it with our other annotators. And it is now a pointer to the point cloud data instead of a vector to avoid extra data copies.
Here is an example of how you would create a lidar and get the point cloud data from it, based on the How They Work section of the docs.
import omni.kit.commands
from pxr import Gf
import omni.replicator.core as rep
lidar_config = "Example_Rotary"
# Create The Camera
_, sensor = omni.kit.commands.execute(
"IsaacSensorCreateRtxLidar",
path="/sensor",
parent=None,
config=lidar_config,
translation=(0, 0, 1.0),
orientation=Gf.Quatd(1,0,0,0),
)
# Create and Attach a render product to the camera
render_product = rep.create.render_product(sensor.GetPath(), [1, 1])
# Create Annotator to read the data from with annotator.get_data()
annotator = rep.AnnotatorRegistry.get_annotator("RtxSensorCpuIsaacCreateRTXLidarScanBuffer")
annotator.attach(render_product)
# This is the new part, it actually gets the data from the annotator and prints the point cloud data.
# When the data changes, you have to fetch it again, i.e. every frame if you want it.
data = annotator.get_data()
print(data["data"])