Skip to content

Validate RTX lidar render product before camera lookup - #779

Open
sylvesterkaczmarek wants to merge 5 commits into
isaac-sim:mainfrom
sylvesterkaczmarek:fix/ros2-lidar-render-product-validation
Open

Validate RTX lidar render product before camera lookup#779
sylvesterkaczmarek wants to merge 5 commits into
isaac-sim:mainfrom
sylvesterkaczmarek:fix/ros2-lidar-render-product-validation

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Description

Fix prerequisite validation in ROS2RtxLidarHelper so missing stages and not-yet-created render products are handled as retryable conditions.

The helper checked stage.GetPrimAtPath(render_product_path) is None, but USD returns an invalid Usd.Prim for a missing path. That allows execution to continue into ViewportManager.get_camera() with a render product that does not exist.

The helper also dereferenced the stage without guarding the case where no USD stage is available yet.

This change:

  • returns cleanly when the USD stage is not available
  • validates the render-product prim with IsValid()
  • prevents camera lookup until the render product actually exists
  • leaves the valid RTX lidar setup and publishing paths unchanged

Validation

  • regression test covers a missing USD stage
  • regression test covers a missing render-product prim
  • both verify ViewportManager.get_camera() is not called prematurely
  • modified Python files pass py_compile and git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant