Hi, I’m seeing this error: ModuleNotFoundError: No module named ‘omni’ when I tried running code in vscode.
my interpreter path has already been set to ~\AppData\Local\ov\pkg\isaac_sim-2023.1.1\kit\python.
I’m using windows. No idea what’s wrong
@khooweiquan2014 do you think this tutorial would help?
is my tasks.json suppsoed to look like this?[see below] or am I supposed to edit it to look like what’s in the tutorial?
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
]
}
I managed to fix it by adding the following lines to the python file[see below]
import os
from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False, "open_usd": "C:/Users/resce/AppData/Local/ov/pkg/isaac_sim-2023.1.1/usd/reacher.usd"})
and using windows command prompt, navigating to isaac-sim folder & running ./python.bat .
Now I’m getting the error:
2024-02-05 09:17:17 [18,053ms] [Warning] [omni.isaac.dynamic_control.plugin] Failed to find articulation at ‘/reacher/base_link’
Below is my code[without the import part], not sure what’s wrong
simulation_app.update()
dc = _dynamic_control.acquire_dynamic_control_interface()
articulation = dc.get_articulation("/reacher/base_link")
dc.wake_up_articulation(articulation)
dof_ptr = dc.find_articulation_dof(articulation, "RevoluteJoint_1")
for i in range(500):
rotation = dc.get_dof_position(dof_ptr)
print(rotation)
dc.set_dof_position(dof_ptr, rotation-0.04)
simulation_app.update()
Hi @khooweiquan2014 - What document are you following where you are seeing this issue?
Also, try following code:
import os
from omni.isaac.kit import SimulationApp
from omni.isaac.dynamic_control import _dynamic_control
simulation_app = SimulationApp({
"headless": False,
"open_usd": "C:/Users/resce/AppData/Local/ov/pkg/isaac_sim-2023.1.1/usd/reacher.usd"
})
simulation_app.update()
dc = _dynamic_control.acquire_dynamic_control_interface()
# Use the articulation's root path instead of the base link if necessary
articulation = dc.get_articulation("/reacher")
# Make sure the articulation was found before proceeding
if articulation == _dynamic_control.NULL_HANDLE:
print('Articulation not found!')
else:
dc.wake_up_articulation(articulation)
dof_ptr = dc.find_articulation_dof(articulation, "RevoluteJoint_1")
for i in range(500):
rotation = dc.get_dof_position(dof_ptr)
print(rotation)
dc.set_dof_position(dof_ptr, rotation-0.04)
simulation_app.update()
Hello,
I’m trying to follow this example: 2.4. Assemble a Simple Robot — Omniverse IsaacSim latest documentation
Is there an example that shows how to apply articulation root for robotic arm? I cant find it anywhere and documentations are not really helping
by the way, I’m getting the following error after applying your changes:
2024-02-13 01:49:27 [Error] [omni.kit.app.plugin] [py stderr]: AttributeError: module ‘omni.isaac.dynamic_control._dynamic_control’ has no attribute ‘NULL_HANDLE’
Hi, I managed to get it working.
I just need do the following before importing anything else:
from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False, "open_usd": "C:/Users/resce/AppData/Local/ov/pkg/isaac_sim-2023.1.1/usd/reacher.usd"})
After which, I followed the time_stepping.py and added the parts for SimulationContext.
I’m just getting a message during rendering saying that material render context has been changed. Not sure how to fix this. Otherwise, thanks for the help.