'isaacsim.sensors' Module Not Found Error in Headless Mode #2256
Replies: 3 comments 4 replies
|
Hi @RodsCoimbra You can enable it by adding the following line to the Isaac Sim Extensions IsaacLab/apps/isaaclab.python.kit Line 36 in f0c1ca6 |
|
Following up, some sensors are CPU only. Have you tried running this using only CPUs? |
Resolution & Modern API Migration PathThe In current Isaac Lab releases, LiDAR and range sensors are natively supported via 1. Configuration & SetupEnable GPU scene query support in your environment from isaaclab.sim import SimulationCfg
sim_cfg = SimulationCfg(
dt=1/60.0,
render_interval=1,
enable_scene_query_support=True, # Mandatory for PhysX/Warp RayCaster scene queries
use_fabric=True # Fabric is fully supported with RayCaster
)2. Native Isaac Lab RayCaster LiDAR ImplementationReplace from isaaclab.sensors import RayCaster, RayCasterCfg
from isaaclab.sensors.patterns import LidarPatternCfg
# Define 2D/3D LiDAR sensor configuration
lidar_cfg = RayCasterCfg(
prim_path="/World/envs/env_.* /Robot/base_link/lidar",
offset=RayCasterCfg.OffsetCfg(pos=(0.0, 0.0, 0.2)),
attach_yaw_only=True,
pattern_cfg=LidarPatternCfg(
channels=16,
vertical_fov_range=(-15.0, 15.0),
horizontal_fov_range=(-180.0, 180.0),
horizontal_res=1.0,
),
debug_vis=False, # Set False for headless production
)
# Instantiate sensor inside environment scene setup
self.lidar = RayCaster(cfg=lidar_cfg)3. Verification Protocol (Headless Mode)Inside your environment # Update raycaster data at each step (No self.render() required!)
self.lidar.update(dt=self.physics_dt)
# Access range distance observations tensor shape: (num_envs, num_rays)
distance_obs = self.lidar.data.ray_hits_w
print(f"LiDAR Hit Distances (Headless): {distance_obs.shape}")Run in headless mode: ./isaaclab.sh -p source/standalone/tutorials/04_sensors/run_ray_caster.py --headlessPrimary Documentation References |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I'm running into an issue when trying to train in headless mode using a PhysX LiDAR sensor. I get an error saying that the module isaacsim.sensors was not found. I also tried using the
--enable_camerasflag just in case, but it didn’t make a difference.Running the same script without
--headlessworks fine, and the module is detected, however it has a big impact on the performance.Is this expected behavior? Do I really need to run without
--headlessfor LiDAR to work, or is there a way to make it work properly in headless mode?Thanks!
All reactions