Skip to content

Major bugfix and improvements to demo routine

Latest

Choose a tag to compare

@FormularSumo FormularSumo released this 24 Aug 10:09

#35 8957041
image
^This small statement at the end of line 175 in FormularBot.py was causing FormularBot to not switch routine when closest to goal. This meant when doing go_to_ally_goal routine FormularBot would almost never move.

#34 54d0d12 315639b
Major improvements in demo routine, improving both DemoBot and FormularBot:
Only boost if target within 45 degrees (stops boosting up the walls)
Only goes for boost if not within 2000 of target and speed > 2100 and angle within 45 degrees (0.785398 radians), to avoiding breaking off a demo when about to contact.
Drift if going for a demo but angle > 1.5 radians (~85 degrees)
Print 'there are no enemies to demo :(' when applicable (was supposed to previously but broken)

Also
DemoBot has anti-turtling code like FormularBot now.
In goto_nearest_boost bot half flips or drifts, not both
Added speed variable (worked out from velocity in 3 different directions) which I can probably use in future for things.

image
image