Encountering issue with UsdGeom.BasisCurves in Isaac 4.2.0

I’m encountering a strange issue when I attempt to create a straight line using UsdGeom.BasisCurves in Isaac Sim 4.2.0. It’s a spooky but repeatable bug. I don’t get any errors. One line always renders properly and any subsequent line is either short nub or is broken up.

If I run the same code in USD Composer or in Isaac Sim 2023.1.1 the lines render correctly.

I’ve tried everything I can think of and have been stumped for 3 days. Any ideas, support would be greatly appreciated.

Isaac Sim Version

[X ] 4.2.0
4.1.0
4.0.0
2023.1.1
2023.1.0-hotfix.1
Other (please specify):

Operating System

Ubuntu 22.04
Ubuntu 20.04
Windows 11
Windows 10
Other (please specify):

GPU Information

  • Model: RTX4090 Laptop
  • Driver Version:

Topic Description

Detailed Description

I’ve been trying for days to debug an issue I’m having when I attempt to draw a straight line using UsdGeom.BasisCurves.

Steps to Reproduce

  1. See the code I’ve provided. You can dump it into a new extension and replicated the issue.

(Add more steps as needed)

Error Messages

There is no error message associated with this issue.

Screenshots or Videos

I’m providing multiple screen shots to demonstrate that the issue can be replicated in Isaac Sim version 4.2.0. When the exact same code is run in USD Composer 2023.2.5 or in Isaac Sim 2023.1.1, the code works fine and there is no issue.

This first image is from Isaac Sim 4.2.0. There should be two straight red lines. You can see that one of the lines gets cutoff and acts like its an issue with rendering – but I don’t know if that’s what it is.

This is another example from Isaac Sim 4.2.0 where sometimes the second line will be displayed broken up. .

This is a screen shot after running the exact same code in USD Composer 2023.1.1. This is rendering correctly. It shows two red lines.

This one is from Isaac Sim 2023.1.1. Again this renders correctly.

Additional Information

What I’ve Tried

I’ve been trying to trouble shoot this for 3 full days and I’ve had no luck. I’m sure it could be some setting I have incorrect in Isaac Sim. Or maybe it’s a bug in the latest version. Help would be greatly appreciated.

Related Issues

(If you’re aware of any related issues or forum posts, please link them here)

Additional Context

Below is the code. I created the images above by running this exact same extension in the three different version of software that I mentioned. These are core functions but if anyone wants the full extension code, I can provide that.

def _create_line(self, points):
    """Create a linear line directly under /World"""
    from omni.usd import get_context
    from pxr import Usd, UsdGeom, Gf, Sdf

    # Increment counter for unique names
    self._curve_counter += 1
    
    # Get the USD stage
    stage = get_context().get_stage()
    
    # Create the basis curve directly under /World
    curve_path = f"/World/Line_{self._curve_counter}"
    curve = UsdGeom.BasisCurves.Define(stage, curve_path)
    
    # Set curve properties
    curve.CreateTypeAttr().Set("linear")
    curve.CreatePointsAttr(points)
    curve.CreateCurveVertexCountsAttr([len(points)])
    
    # Set width with interpolation
    widths_attr = curve.CreateWidthsAttr([0.5])
    widths_attr.SetMetadata("interpolation", "constant")
    
    # Set color (red in this case)
    curve.CreateDisplayColorAttr([(1, 0, 0)])
    
    return curve_path


def _on_test_line_1(self):
    """Test function to create first test line"""
    points = [(0, 0, 0), (10, 25, 0)]
    curve_path = self._create_line(points)
    print(f"[DEBUG] Created test line 1 at: {curve_path}")


def _on_test_line_2(self):
    """Test function to create second test line"""
    points = [(0, 0, 0), (10, 15, 10)]
    curve_path = self._create_line(points)
    print(f"[DEBUG] Created test line 2 at: {curve_path}")