Update regionals/bioglow_mission_2.py
This commit is contained in:
@@ -27,7 +27,7 @@ async def solve_missions(): # Exploding Seeds - Johannes
|
|||||||
robot.reset()
|
robot.reset()
|
||||||
|
|
||||||
# Solving Exploding seeds
|
# Solving Exploding seeds
|
||||||
await robot.move(2, speed=100, acceleration=400, then=robot.Stop.NONE) # 2 cm forward, 100% speed, 400 mm/s² accel
|
await robot.move(1, speed=100, acceleration=400, then=robot.Stop.NONE) # 2 cm forward, 100% speed, 400 mm/s² accel
|
||||||
await robot.arc(15, cm=11.5, speed=100, turn_speed=48, acceleration=400, turn_acceleration=100, then=robot.Stop.NONE) # arc: circle on the robot's RIGHT (15 cm radius), FORWARD 11.5 cm along it (nose turns right) | 100% speed, 48% turn speed, 400 mm/s² accel, 100 °/s² turn accel
|
await robot.arc(15, cm=11.5, speed=100, turn_speed=48, acceleration=400, turn_acceleration=100, then=robot.Stop.NONE) # arc: circle on the robot's RIGHT (15 cm radius), FORWARD 11.5 cm along it (nose turns right) | 100% speed, 48% turn speed, 400 mm/s² accel, 100 °/s² turn accel
|
||||||
await robot.move(27, speed=100, acceleration=400, then=robot.Stop.HOLD)
|
await robot.move(27, speed=100, acceleration=400, then=robot.Stop.HOLD)
|
||||||
await robot.left_arm.move_by(70, speed=70) # left arm 70°, 70% arm speed
|
await robot.left_arm.move_by(70, speed=70) # left arm 70°, 70% arm speed
|
||||||
@@ -42,30 +42,29 @@ async def solve_missions(): # Exploding Seeds - Johannes
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Towards the vine
|
# Towards the vine
|
||||||
await robot.arc(61, degrees=70, speed=80, turn_speed=48, acceleration=400, turn_acceleration=100, then=robot.Stop.HOLD) # arc: circle on the robot's RIGHT (61 cm radius), FORWARD 70° (nose turns right) | 100% speed, 48% turn speed, 400 mm/s² accel, 100 °/s² turn accel
|
await robot.arc(68, degrees=65, speed=80, turn_speed=48, acceleration=400, turn_acceleration=100, then=robot.Stop.HOLD) # arc: circle on the robot's RIGHT (61 cm radius), FORWARD 70° (nose turns right) | 100% speed, 48% turn speed, 400 mm/s² accel, 100 °/s² turn accel
|
||||||
|
|
||||||
# This where we drop the right arm
|
# This where we drop the right arm
|
||||||
await robot.multitask(
|
await robot.multitask(
|
||||||
robot.right_arm.move_by(-110, speed=100),
|
robot.right_arm.move_by(-110, speed=100),
|
||||||
robot.turn(-75, speed=70, acceleration=100, then=robot.Stop.HOLD)
|
robot.turn(-70, speed=70, acceleration=100, then=robot.Stop.HOLD)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Untangled the vine
|
# Untangled the vine
|
||||||
await robot.move(10, speed=70, acceleration=200, then=robot.Stop.COAST)
|
await robot.move(11, speed=70, acceleration=200, then=robot.Stop.COAST)
|
||||||
await robot.right_arm.move_by(70, speed=100) # right arm 70°, 100% arm speed
|
await robot.right_arm.move_by(70, speed=100) # right arm 70°, 100% arm speed
|
||||||
await robot.move(-18, speed=60, acceleration=200, then=robot.Stop.COAST) # 13 cm backward, 18% speed, 200 mm/s² accel
|
await robot.move(-11, speed=60, acceleration=200, then=robot.Stop.COAST) # 13 cm backward, 18% speed, 200 mm/s² accel
|
||||||
|
|
||||||
# Solving Sunlight roof
|
# Solving Sunlight roof
|
||||||
await robot.multitask(
|
await robot.multitask(
|
||||||
robot.turn(95, speed=48, acceleration=100, then=robot.Stop.HOLD), # 95° right, 48% turn speed, 100 °/s² turn accel
|
robot.turn(95, speed=48, acceleration=100, then=robot.Stop.HOLD), # 95° right, 48% turn speed, 100 °/s² turn accel
|
||||||
robot.right_arm.move_by(100, speed=100) # right arm -40°, 100% arm speed
|
robot.right_arm.move_by(100, speed=100) # right arm -40°, 100% arm speed
|
||||||
)
|
)
|
||||||
await robot.move(18, speed=100, acceleration=400, then=robot.Stop.COAST), # 16 cm forward, 100% speed, 400 mm/s² accel
|
await robot.move(19, speed=100, acceleration=400, then=robot.Stop.COAST), # 16 cm forward, 100% speed, 400 mm/s² accel
|
||||||
await robot.move(-5, speed=60, acceleration=200, then=robot.Stop.COAST) # 13 cm backward, 18% speed, 200 mm/s² accel
|
|
||||||
|
|
||||||
# Return to barracks
|
# Return to barracks
|
||||||
await robot.move(-15, speed=100, acceleration=400, then=robot.Stop.NONE)
|
await robot.move(-20, speed=100, acceleration=400, then=robot.Stop.NONE)
|
||||||
await robot.arc(30, degrees=-90,then = robot.Stop.NONE)
|
await robot.arc(40, degrees=-90,then = robot.Stop.NONE)
|
||||||
await robot.move(-40, speed=100, acceleration=400, then=robot.Stop.BRAKE)
|
await robot.move(-40, speed=100, acceleration=400, then=robot.Stop.BRAKE)
|
||||||
robot.stop()
|
robot.stop()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user