コード例 #1
0
def main():
    root_path = os.path.join(os.path.dirname(__file__), 'assets')
    file_path = os.path.join(root_path, 'wam.urdf')
    urdfLoader = DartLoader()
    urdfLoader.addPackageDirectory("herb_description", root_path)
    wam = urdfLoader.parseSkeleton(file_path)

    world = World.create()
    world.addSkeleton(wam)

    viewer = Viewer(world)

    if sys.flags.interactive == 0:
        viewer.app.run()
コード例 #2
0
ファイル: main_opengl.py プロジェクト: jslee02/dartpy-1
def main():
    root_path = os.path.join(os.path.dirname(__file__), 'assets')
    file_path = os.path.join(root_path, 'wam.urdf')
    urdfLoader = DartLoader()
    urdfLoader.addPackageDirectory("herb_description", root_path)
    wam = urdfLoader.parseSkeleton(file_path)

    world = World.create()
    world.addSkeleton(wam)

    window = SimWindow()
    window.setWorld(world)

    glutInit(sys.argv)
    window.initWindow(640, 480, "Rigid Cubes")
    glutMainLoop()