RTX Laser ObjectId incorrect

I am trying to use RtxSensorCpuIsaacCreateRTXLidarLidarScan Buffer and accessing the annotator with the following code

def capture_lidar(self):
    rep.orchestrator.step_async()
    data_np = self.annotator_2d.get_data(device="cpu")
    save_data(data_np)


sim_context.play()
while simulation_app.is_running():
    my_world.step(render=True)
    if my_world.is_playing():
        if my_world.current_time_step_index == 0:
            my_world.reset()
        capture_lidar()

sim_context.close()
simulation_app.close()

When checking if the labelling of the lidar data was correct I got the following plot for non wall labels.
In reality the single blobs in the centre should be the correct objects.

Figure_1

The ObjectId values can be used to get the prim paths. They don’t mean much otherwise.

Also, any objectId that is on a return with a distance <= 0 will not be correct because most data on a return is not set when the distance of the return is not valid.

I’m not sure how to read your graph, but it is possible to check the ObjectIds on returns with distance > 0 only?

Thanks for your responds, sorry if my problem was not articulated well.
I have checked that the distance of all points is > 0, which was already the case.


I have a scene like the one scene in the picture above, with the LiDAR sensor located at the position of the coordinate system.
I then used omni.syntheticdata._syntheticdata.acquire_syntheticdata_interface to convert the detected objectIds to the prim paths of the object.

I then plotted all the points received in the point cloud and coloured the points in red, which were at the index, where the objectId matched one of the human prims
Screenshot from 2023-10-31 09-52-12

I also attached the raw data collected in a json file, with the conversion between objectId and prim path

        "0": "",
        "35": "/World/Characters/Tom/ManRoot/female_adult_police_02/female_adult_police_02/opaque__fabric__policepants",
        "206": "/World/Airport/Airport/wall_1/wall_1/geometry/walls",
        "216": "/World/Daav/base_link/visuals/Kaya_Body_Collapsed/Kaya_Body_Mesh",
        "91": "/World/Characters/Jerry/male_adult_construction_03/ManRoot/male_adult_construction_03/male_adult_construction_03/opaque__fabric__jeans"
    }

01072.txt (285.6 KB)

Additionally, the labels not being correct, the function of using the local coordinate frame also did not have any influence and the global one was used anyway

OK, I see the problem in your data. I have not reproduced it myself, but It looks like a real problem! Thanks for reporting it!

From the objectId output, it looks like maybe the full scan is getting output instead of only the ones with distance > 0… because every other one is 0 and usually that is the second return.

Couple things you may be able to try… set maxReturns 1 in your config if you don’t need a dual return lidar. Also, you may want to set keepOnlyPositiveDistance to false and see if you get objectId to line up correctly.

Also, are you using this function to get the prim name?

acquire_syntheticdata_interface().get_uri_from_instance_segmentation_id(object_id)

1 Like