Skip to content

Validate ROS2 CameraInfo render products before setup - #778

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

Validate ROS2 CameraInfo render products before setup#778
sylvesterkaczmarek wants to merge 5 commits into
isaac-sim:mainfrom
sylvesterkaczmarek:fix/ros2-camera-info-render-product-validation

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Description

Make ROS2CameraInfoHelper treat a missing USD stage or missing render-product prim as a retryable prerequisite instead of continuing into camera-info setup.

Usd.Stage.GetPrimAtPath() returns an invalid Usd.Prim when a path does not exist; it does not return None. The helper was checking is None for both left and right render products, so a not-yet-created render product could pass validation and reach read_camera_info().

The non-SRTX path also constructed Usd.EditContext(stage, stage.GetSessionLayer()) without first checking whether a stage was available.

This change:

  • returns cleanly when the USD stage is not available yet
  • validates the left render product with Usd.Prim.IsValid()
  • validates the optional right/stereo render product the same way
  • preserves existing mono, stereo, and SRTX setup once prerequisites are valid

Validation

  • regression test covers a missing USD stage
  • regression test covers a missing left render product
  • regression test covers a missing right/stereo render product
  • verifies invalid render products are rejected before read_camera_info()
  • 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