Incorrect python typing for World.instance() method. (Returns SimulationContext instead of World)

Please provide all relevant details below before submitting your post. This will help the community provide more accurate and timely assistance. After submitting, you can check the appropriate boxes. Remember, you can always edit your post later to include additional information if needed.

Isaac Sim Version

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

Isaac Lab Version (if applicable)

1.2
1.1
1.0
Other (please specify):

Operating System

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

GPU Information

  • Model: RTX 4090
  • Driver Version: 560.94

Topic Description

Detailed Description

The python typing information for World.instance() method is incorrect.

World is sub-class of SimulationContext but it does NOT implement the instance method.

When people call World.instance they are invoking SimulationContext.instance and this returns SimulationContext type. It doesn’t know about World

However, the World class does implement its own properties and methods which developers expect to have access to, such as scene.

If they do NOT override the type to World they will get this error

If they DO override the type as world: World = World.instance() then they get this other error

Steps to Reproduce

  1. N/A

Error Messages

(If applicable, copy and paste any error messages you received)

Screenshots or Videos

In context, above

Additional Information

What I’ve Tried

N/A

Related Issues

N/A

Additional Context

I think the correct solution is to add an instance method to the World class which returns World type. Although there might be some better solution.