I’m trying to get perfect reflection returns with the RTX Lidar Sensor. So far I’ve only been able to get very diffuse/noisy returns using the Aluminum material which seems to be the clearest reflection return (it also seems to be very distorted).
How can I get a perfect mirror return without distortion and noise? Is it a problem with the material and if so is there a material that will give a perfect reflection return? I’ve already tried the Retroreflective material.
Related forum post:
isaac-sim-rtx-lidar-sensor-interacting-with-transparent-and-reflective-objects
Here’s a script to reproduce (Isaac Sim 4.0.0) - please note that I run this from vscode not the script editor:
import omni
import omni.usd
import carb
import omni.kit.app
import omni.kit.commands
import numpy as np
import asyncio
# from .lidar_rtx import LidarRtx
from omni.isaac.IsaacSensorSchema import IsaacRtxLidarSensorAPI
from omni.isaac.sensor import LidarRtx
from omni.isaac.core.utils.prims import get_prim_at_path, get_prim_type_name
from omni.isaac.core.prims.xform_prim_view import XFormPrimView
from omni.isaac.core.utils.stage import get_current_stage, update_stage, create_new_stage, update_stage_async
import omni.isaac.core.utils.stage as stage_utils
from omni.replicator.core.utils import get_non_xform_prims
import omni.replicator.core as rep
from pxr import Gf
from omni.isaac.core import World
from omni.isaac.core.objects.ground_plane import GroundPlane
from omni.isaac.core.objects import DynamicCuboid
manager = omni.kit.app.get_app().get_extension_manager()
manager.set_extension_enabled("omni.physx", True)
manager.set_extension_enabled("omni.isaac.range_sensor", True)
manager.set_extension_enabled("omni.isaac.debug_draw", True)
manager.set_extension_enabled("omni.sensors.nv.lidar", True)
await stage_utils.create_new_stage_async()
carb.settings.get_settings().set_bool("/rtx/materialDb/nonVisualMaterialCSV/enabled", False)
carb.settings.get_settings().set_bool("/app/sensors/nv/lidar/enableRtxReflectanceInformation", True)
carb.settings.get_settings().set_bool("/app/sensors/nv/lidar/enableAdditionalRtxReturnInformation", True)
async def create_lidar(prim_path, name):
prim_path += "_lidar"
lidar = LidarRtx(prim_path=prim_path, name=name, config_file_name="lidar_return_test")
lidar.initialize()
await update_stage_async()
lidar.enable_visualization()
await update_stage_async()
return prim_path, lidar
world = World(stage_units_in_meters=1.0)
await world.initialize_simulation_context_async()
await update_stage_async()
world.scene.add_default_ground_plane()
DynamicCuboid(prim_path="/World/cube1", scale=np.array([2, 2, 2]), position=np.array([3, 0, 1]))
DynamicCuboid(prim_path="/World/cube2", scale=np.array([2, 2, 2]), position=np.array([-3, 0, 1]))
omni.kit.commands.execute(
"CreateMdlMaterialPrim",
mtl_url="http://omniverse-content-production.s3-us-west-2.amazonaws.com/Materials/Base/Glass/Clear_Glass.mdl",
mtl_name="Clear_Glass",
mtl_path="/World/Looks/Clear_Glass",
)
omni.kit.commands.execute(
"CreateMdlMaterialPrim",
mtl_url="http://omniverse-content-production.s3.us-west-2.amazonaws.com/Materials/vMaterials_2/Metal/Aluminum.mdl",
mtl_name="Aluminum",
mtl_path="/World/Looks/Aluminum",
)
await update_stage_async()
omni.kit.commands.execute("BindMaterial", prim_path=["/World/cube1"], material_path="/World/Looks/Aluminum")
omni.kit.commands.execute("BindMaterial", prim_path=["/World/cube2"], material_path="/World/Looks/Aluminum")
cam = rep.create.camera(position=np.array([0, 0, 1]))
cam_path = get_non_xform_prims(cam.get_output("prims"))[0]
# print(get_prim_type_name(cam_path))
_, sensor = await create_lidar(cam_path, "lidar")
Also I am using the Gaussian Beam rayType
. Lidar config attached
lidar_return_test.zip (262.7 KB)