Update competition_codes/state/sunprarie_state_main.py
This commit is contained in:
@@ -84,14 +84,14 @@ Run#1
|
||||
async def Run1():
|
||||
|
||||
# Fast approach to near-stall position
|
||||
await left_arm.run_angle(2000, 180) # Fast movement upward
|
||||
await left_arm.run_angle(2000, -190) # Fast movement downward
|
||||
|
||||
# Gentle stall detection (shorter distance = faster)
|
||||
await left_arm.run_until_stalled(1500, duty_limit=15)
|
||||
await left_arm.run_until_stalled(-1500, duty_limit=15)
|
||||
left_arm.reset_angle(0)
|
||||
print(f"Initial left arm angle : {left_arm.angle()}")
|
||||
|
||||
await solve_whats_on_sale_v2()
|
||||
await solve_whats_on_sale_v3()
|
||||
await solve_silo()
|
||||
|
||||
# return to base
|
||||
@@ -100,13 +100,13 @@ async def Run1():
|
||||
await drive_base.arc(200,None,-300)
|
||||
drive_base.stop()
|
||||
|
||||
async def solve_whats_on_sale():
|
||||
async def solve_whats_on_sale_v3():
|
||||
|
||||
right_arm.run_angle(500,30)
|
||||
|
||||
#Automated inconsistency
|
||||
#left_arm.run_angle(500,-119.5)
|
||||
left_arm.run_target(500,-121.5, Stop.HOLD)
|
||||
left_arm.run_target(500,70, Stop.HOLD)
|
||||
print(f"Position left arm angle : {left_arm.angle()}")
|
||||
|
||||
await drive_base.straight(180)
|
||||
@@ -412,6 +412,7 @@ async def Run11(): # experimental surface brushing attachment
|
||||
#await drive_base.straight(400)
|
||||
#await left_arm.run_angle(50,120)
|
||||
#await drive_base.straight(-200)
|
||||
await wait(67)
|
||||
await left_arm.run_angle(300,-300)
|
||||
await drive_base.straight(-600)
|
||||
drive_base.stop()
|
||||
|
||||
Reference in New Issue
Block a user