#####################################
# Solution for BioGlow Mission 14,15
#####################################

import bioglow_helpers as helper
from bioglow_robot_settings import *   # drive_base, left_arm, right_arm, ... all come from settings

async def solve_missions():  # Seed of Renewal and Keystone Species - Parthiv
          # BLUE COLOR CODE
    drive_base.stop()
    drive_base.reset(0,0)

    helper.set_speed(400,200,200,100)
    await left_arm.run_angle(1000,-25)
    await drive_base.arc(-315,angle=90, then=Stop.HOLD)
    await drive_base.straight(150,then=Stop.HOLD)
    await drive_base.turn(90,then=Stop.HOLD)
    await drive_base.straight(235,then=Stop.NONE)
    helper.set_speed(100,200,300,200)
    await drive_base.turn(-85,then=Stop.HOLD)
    helper.set_default_speed
    await drive_base.straight(90,then=Stop.COAST)
    await drive_base.straight(-95)
    await drive_base.turn(-85)
    await drive_base.straight(-250)
    await drive_base.turn(60)
    helper.set_speed(50,200,250,200)
    await drive_base.straight(-175)
    helper.set_default_speed
    await drive_base.straight(100)
    await drive_base.turn(-125)
    await left_arm.run_angle(200,21)
    await drive_base.turn(-21)
    await drive_base.straight(25)
    await left_arm.run_angle(1000,-25)
    helper.set_speed(500,200,200,100)
    await drive_base.straight(250)
    await drive_base.turn(-42)
    await drive_base.straight(150)
    await right_arm.run_angle(300,-40)
    await drive_base.straight(-150,then=Stop.NONE)
    await drive_base.turn(93,then=Stop.HOLD)
    await drive_base.straight(550,then=Stop.NONE)

  
   



if __name__ == "__main__":        # This run this mission stand-alone when not called from bioglow_main.py
    run_task(solve_missions())
