Why can GetPrimAtPath func get the mesh parts in visuals and collisions? #2850
Replies: 1 comment
-
Thank you for posting this. The core issue behind your RayCaster/LiDAR sensor in Isaac Lab failing to detect imported assets like your bottle is almost certainly due to the asset's mesh prims being instance proxies in the USD stage. In Omniverse/Isaac Sim, light gray (and sometimes padlock icons) in the stage tree indicate instanced or referenced prims, sometimes called "instance proxies".1 Why this breaks RayCaster (LiDAR):
Solution: Make the asset's mesh prims non-instancedYou need to "flatten" or "make unique" the referenced mesh prims before using the asset for ray-casting. Here’s what works in practice in Isaac Sim:
Related Links:
Key Takeaways
This is a common workflow pitfall when working with imported or referenced USD assets and Omniverse sensor simulations. If you convert your bottle mesh to a non-proxy prim, your RayCaster/LiDAR will detect it as expected.132 Footnotes
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for your wonderful work! I want to simulate the lidar sensor of Unitree G1, so I create a lidar cfg like this:
height_scanner = RayCasterCfg( prim_path="/World/envs/env_1/Robot/mid360_link", update_period=1/60, attach_yaw_only=False, max_distance=40.0, pattern_cfg=patterns.LidarPatternCfg( channels=40, vertical_fov_range=(-52, 7), # 59° 垂直 horizontal_fov_range=(0.0, 360.0), # 全向雷达 horizontal_res=0.072 # 由点频反推出 ), debug_vis=True, mesh_prim_paths=["/World/envs/env_1/Bottle"], #mesh_prim_paths=["/World/defaultGroundPlane"], )
I have already imported a bottle like this:
AssetBaseCfg(class_type=None, prim_path='{ENV_REGEX_NS}/Bottle', spawn=UsdFileCfg(func=<function spawn_from_usd at 0x739964d30e50>, visible=True, semantic_tags=None, copy_from_source=True, mass_props=None, deformable_props=None, rigid_props=RigidBodyPropertiesCfg(rigid_body_enabled=None, kinematic_enabled=None, disable_gravity=False, linear_damping=None, angular_damping=None, max_linear_velocity=None, max_angular_velocity=None, max_depenetration_velocity=1000.0, max_contact_impulse=None, enable_gyroscopic_forces=None, retain_accelerations=None, solver_position_iteration_count=None, solver_velocity_iteration_count=None, sleep_threshold=None, stabilization_threshold=None), collision_props=None, activate_contact_sensors=False, scale=None, articulation_props=ArticulationRootPropertiesCfg(articulation_enabled=None, enabled_self_collisions=None, solver_position_iteration_count=None, solver_velocity_iteration_count=None, sleep_threshold=None, stabilization_threshold=None, fix_root_link=False), fixed_tendons_props=None, joint_drive_props=None, visual_material_path='material', visual_material=None, usd_path='/home/nerv/shengyin/EmPlan-Matrix-LowLevel/assets/3678/mobility_scale_isaacsim.usd', variants=None), init_state=AssetBaseCfg.InitialStateCfg(pos=(0.8, 0.0, 0.68), rot=(1.0, 0.0, 0.0, 0.0)), collision_group=0, debug_vis=False)
But I found that the lidar can not be used to track the bottle, because the func get_all_matching_child_prims in IsaacLab/source/isaaclab/isaaclab/sim/utils.py can not find the children prims in visuals and collisions of my asset which is shown in the below image:
The bottle is normal in the GUI but in the GUI stage the children of visuals are all in very light gray and they can not be found by prim = stage.GetPrimAtPath(prim_path) in get_all_matching_child_prims. What is the core key of this problem ?
I will be very happy if you can help me!
Beta Was this translation helpful? Give feedback.
All reactions