THank you for the screenshot of your code. It's easier to debug that way.
You need some delays in that code. It runs too fast for GoPiGo, and the robot is getting flooded by the broadcast commands. And it will go through every single broadcast before it will stop. You can try with a delay of 0.5 seconds. It takes a bit of experimenting. It depends on which Raspberry Pi you have, which SD card. Sometimes it's 0.2 seconds, sometimes it's more. It also depends on your code.
Let me know if that helps.