No module named 'omni.isaac.sensor' Error in Isaac Sim 20231.0

I’m facing a weird behavior when trying to import the Camera class from omni.isaac.sensor. If I’m executing the camera.py from the standalone examples, everything works as expected and the module is imported correctly. Trying to use the same import in the cartpole_task.py script and executing the cartpole_train.py from the standalone examples, it is not working and throwing a module not found error… What am I doing wrong here?

@koehne1 i am just an user passing by. are you using the SimulationApp class? because if you are following along with tutorial 9.8 ( Custom RL Example using Stable Baselines), i am wondering if what you are encountering can be solved by instantiating the SimulationApp class before the imports:

https://docs.omniverse.nvidia.com/isaacsim/latest/manual_standalone_python.html#usage-example

@Simplychenable the SimulationApp class is instantiated in the vec_env_base init function which is called at the beginning of the cartpole_train.py script. In the Terminal, I can also see that the SimulationApp is loaded correctly before the omni.isaac.sensor import.

Strangely I am running into the same problem. It works fine when I do the import in a small script, but when I am trying to do it in RL framework, it complains that it can’t find the module.

Hi there, the gym app files use a minimal set of extensions required for the RL examples provided. To include additional extensions, please refer to this thread: No module named 'omni.isaac.sensor' · Issue #93 · NVIDIA-Omniverse/OmniIsaacGymEnvs · GitHub

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.