Hello,
Since I saw that PhysX lidars would not work on people, I am turning back to RTX lidars. Im encoutering some issues concerning the latter.
Since I can’t create it on the GUI im using the script that we can find in the documentation isaac_sim_sensors_rtx_based_lidar and here I have created a “My_lidar.json” file where it is exactly a replicate of “Example_Rotary.json”.
Here is the script to create the RTX lidar:
import omni.kit.commands
from pxr import Gf
import omni.replicator.core as rep
lidar_config = "My_lidar"
# 1. Create The Camera
_, sensor = omni.kit.commands.execute(
"IsaacSensorCreateRtxLidar",
path="/sensor",
parent=None,
config=lidar_config,
translation=(0, 0, 15.0),
orientation=Gf.Quatd(1,0,0,0),
)
# 2. Create and Attach a render product to the camera
render_product = rep.create.render_product(sensor.GetPath(), [1, 1])
# 3. Create Annotator to read the data from with annotator.get_data()
annotator = rep.AnnotatorRegistry.get_annotator("RtxSensorCpuIsaacCreateRTXLidarScanBuffer")
annotator.attach(render_product)
# 4. Create a Replicator Writer that "writes" points into the scene for debug viewing
writer = rep.writers.get("RtxLidarDebugDrawPointCloudBuffer")
writer.attach(render_product)
And here is the configuration file I’m using:
{
"class": "sensor",
"type": "lidar",
"name": "My Lidar",
"driveWorksId": "GENERIC",
"profile":
{
"scanType": "rotary",
"intensityProcessing": "normalization",
"rayType": "IDEALIZED",
"nearRangeM": 5.0,
"farRangeM": 300.0,
"startAzimuthDeg": 0.0,
"endAzimuthDeg": 360.0,
"upElevationDeg": 10.0,
"downElevationDeg": -15.0,
"rangeResolutionM": 0.04,
"rangeAccuracyM": 0.02,
"avgPowerW": 0.002,
"minReflectance": 0.1,
"minReflectanceRange": 300.0,
"wavelengthNm": 903.0,
"pulseTimeNs": 6,
"azimuthErrorMean": 0.0,
"azimuthErrorStd": 0.015,
"elevationErrorMean": 0.0,
"elevationErrorStd": 0.0000,
"maxReturns": 2,
"scanRateBaseHz": 10.0,
"reportRateBaseHz": 36000,
"numberOfEmitters": 128,
"rangeOffset": 5.0,
"emitters":
{
"azimuthDeg": [-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-3.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0],
"elevationDeg": [-15.0,-14.19,-13.39,-12.58,-11.77,-10.97,-10.16,-9.35,-8.55,-7.74,-6.94,-6.13,-5.32,-4.52,-3.71,-2.9,-2.1,-1.29,-0.48,0.32,1.13,1.94,2.74,3.55,4.35,5.16,5.97,6.77,7.58,8.39,9.19,10.0,-15.0,-14.19,-13.39,-12.58,-11.77,-10.97,-10.16,-9.35,-8.55,-7.74,-6.94,-6.13,-5.32,-4.52,-3.71,-2.9,-2.1,-1.29,-0.48,0.32,1.13,1.94,2.74,3.55,4.35,5.16,5.97,6.77,7.58,8.39,9.19,10.0,-15.0,-14.19,-13.39,-12.58,-11.77,-10.97,-10.16,-9.35,-8.55,-7.74,-6.94,-6.13,-5.32,-4.52,-3.71,-2.9,-2.1,-1.29,-0.48,0.32,1.13,1.94,2.74,3.55,4.35,5.16,5.97,6.77,7.58,8.39,9.19,10.0,-15.0,-14.19,-13.39,-12.58,-11.77,-10.97,-10.16,-9.35,-8.55,-7.74,-6.94,-6.13,-5.32,-4.52,-3.71,-2.9,-2.1,-1.29,-0.48,0.32,1.13,1.94,2.74,3.55,4.35,5.16,5.97,6.77,7.58,8.39,9.19,10.0],
"fireTimeNs": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 3500, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 7000, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 10500, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 14000, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 17500, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 21000, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500, 24500]
},
"intensityMappingType": "LINEAR"
}
}
1. The problem I am encountering is that changing the “nearRangeM” and “farRangeM” on this config file doesnt affect at all the Lidar lines produced. I dont know exactly what I’m doing wrong.
-
Is there a possible workaround to not use the script but instead use the GUI and have it work properly ? (as the PhysX one which is more intuitive with the appropriate parameter just along with it).
-
As I understood, if I want to publish the point cloud in ROS1 I am obliged to modify the SGDpipeline (once created) / add in the script the ROS1 Helper to publish my point cloud ? Or is there a simpler or replacable way to do it ? [For some reasons I need to have python 3.11 and I can’t run standalone python code which requires specifically python 3.10] so the only accessible way for me is the script editor.
-
When the lidar / SGDpipeline is created, is it possible to delete it to recreate another one using the same script ?
Thank you for your answer !