コード例 #1
0
def collect_poms(msleep_time=50,
                 forwards_amount=1000,
                 amount=1250):  # Actual act of collecting poms once aligned
    m.backwards(amount)
    m.arm_slow(c.ARM_COLLECTION_POS)
    msleep(msleep_time)
    m.forwards(forwards_amount)
コード例 #2
0
def get_frisbee():
    print "Starting get_frisbee()"
    m.arm_slow(c.ARM_UP_POS, 2, 1)
    m.backwards(900)
    m.arm_slow(c.ARM_FRISBEE_GRAB_POS, 2, 1)
    m.forwards(2000)
    m.arm_slow(c.ARM_FRISBEE_DROP_POS, 4, 1)
    m.turn_left(
        int(c.LEFT_TURN_TIME /
            5))  # An 18 degree wiggle back and forth to shake frisbee loose
    m.turn_right(int(c.RIGHT_TURN_TIME / 5))
    m.backwards(1000)
    m.lift_arm(c.ARM_FRISBEE_FARTHER_DROP_POS)
コード例 #3
0
def get_high_poms_cheeky():
    print "Starting get_high_poms_cheeky()"
    f.forwards_until_black_lfcliff()
    f.align_close_fcliffs()
    m.arm_slow(c.ARM_UP_POS, 2, 1)
    m.turn_right()
    m.forwards(2680)
    m.turn_left()
    f.forwards_until_black_lfcliff()
    f.align_close_fcliffs()
    collect_poms(10000)
    f.backwards_until_white_lfcliff()
    m.arm_slow(c.ARM_UP_POS, 2, 1)
コード例 #4
0
def get_farther_mid_poms():
    f.forwards_until_line_fcliffs()
    f.align_close_cliffs()
    m.arm_slow(c.ARM_UP_POS, 2, 1)
    f.right_point_turn_until_lfcliff_senses_black()
    f.right_point_turn_until_lfcliff_senses_white()
    f.lfollow_lfcliff_smooth(2)
    f.lfollow_lfcliff_smooth_until_right_depth_senses_object()
    m.forwards(1000)
    m.turn_left()
    f.backwards_through_line_lfcliff()
    f.align_close_fcliffs()
    collect_poms()
コード例 #5
0
ファイル: utils.py プロジェクト: MAARobotics/Incredibots2019
def test_movement(
):  # Used to see if movements and their defaults function as intended
    print "Testing movement\n"
    m.forwards()
    msleep(
        500
    )  # Using msleep() instead of wait() to make sure each command turns off its wheels
    m.backwards()
    msleep(500)
    m.turn_left()
    msleep(500)
    m.turn_right()
    msleep(500)
    print "Testing complete. Exiting...\n"
    exit(86)