Пример #1
0
def test_puma560_angle_change():
    """
    This test loads in the Puma560 model and changes its angles over time.
    Joint angles are printed for validation.
    """
    puma560 = gph.import_puma_560(g_canvas.scene)

    print("Prior Poses")
    puma560.print_joint_poses()

    # Get the poses for a ready-position
    puma = Puma560()
    poses = puma.fkine(puma.config('qr'), alltout=True)

    sleep(2)

    puma560.set_joint_poses([
        SE3(),  # 0 (Base doesn't change)
        poses[0],  # 1
        poses[1],  # 2
        poses[2],  # 3
        poses[3],  # 4
        poses[4],  # 5
        poses[5]  # 6
    ])

    print("Final Poses")
    puma560.print_joint_poses()
Пример #2
0
def test_clear_scene_with_grid_updating():
    """
    This test will import the Puma560 model, then after 2 seconds, clear the canvas of all models.
    """
    puma560 = gph.import_puma_560(g_canvas.scene)

    # Get the poses for a ready-position
    puma = Puma560()
    poses = puma.fkine(puma.config('qr'), alltout=True)

    sleep(2)

    puma560.set_joint_poses([
        SE3(),  # 0 (Base doesn't change)
        poses[0],  # 1
        poses[1],  # 2
        poses[2],  # 3
        poses[3],  # 4
        poses[4],  # 5
        poses[5]  # 6
    ])

    sleep(2)

    clear()
    del puma560
Пример #3
0
def test_clear_scene():
    """
    This test will import the Puma560 model, then after 2 seconds, clear the canvas of all models.
    """
    puma560 = gph.import_puma_560(g_canvas.scene)
    puma560.set_reference_visibility(True)

    sleep(2)

    clear()
    del puma560
Пример #4
0
def test_import_stl():
    """
    This test will create a canvas with the Puma560 model loaded in.
    """
    puma560 = gph.import_puma_560(g_canvas.scene)
    puma560.print_joint_poses()