tingbo
1
代码如下
"from omni.isaac.examples.base_sample import BaseSample
from omni.isaac.core import World
class HelloWorld(BaseSample):
def init(self) → None:
super().init()
return
def setup_scene(self):
world = World.instance()
world.scene.add_default_ground_plane()
return"
Hi tingbo,
在isaac sim的安装目录下测试(如4.0下为~/.local/share/ov/pkg/isaac-sim-4.0.0),使用当前目录下的 python.sh 执行py代码
tingbo
3
是在vscode里面报错
[{
“resource”: “/home/ltb/.local/share/ov/pkg/isaac-sim-4.2.0/exts/omni.isaac.examples/omni/isaac/examples/hello_world/hello_world.py”,
“owner”: “python”,
“code”: {
“value”: “reportMissingImports”,
“target”: {
“$mid”: 1,
“external”: “pyright/docs/configuration.md at main · microsoft/pyright · GitHub”,
“path”: “/microsoft/pyright/blob/main/docs/configuration.md”,
“scheme”: “https”,
“authority”: “github.com”,
“fragment”: “reportMissingImports”
}
},
“severity”: 4,
“message”: “无法解析导入“omni.isaac.core.objects””,
“source”: “Pylance”,
“startLineNumber”: 17,
“startColumn”: 6,
“endLineNumber”: 17,
“endColumn”: 29
}]