Why is our autonomous code not working?

Our code is coded in blocks, and when our robot touches a triball or anything else, it stops. It is so confusing. We are beginners in both python and blocks.
Help Please!

Heyo! Welcome to the forums!
Help us help you
Please give that a read first.
In order for us to answer your question we need to know more details.
What do you have currently? (send us your code)

- Henry 344E

Ok, I also just joined, but I will say it might have something about how when it touches what feels like the wall, it might just stop. Try to put in the code that says “Grab” when you get to what you want. Also, I would need the code as Henry said. If what I recommended didn’t work, try the FAQs on the website.

Hope you fix it!
-Starry Teh Cat (Call me Starry!)

Sometimes, if the code can’t fully execute one line, it won’t start the next. It’s extremely annoying, but if you’re precise enough you can stop it. Not sure if that’s the issue, though, please post the code.

For example, say my robot was facing a wall and it was coded to drive forward and then turn, if it hits the wall and can’t drive the full distance, it won’t turn.

Make sure your drivetrain motor’s max torque is set to 100.

Sorry about how much code there is. it would not be there if I had done most of it.
THEGLADSPROGRAMING (1).v5blocks (23.9 KB)

Since you blocks are based on distance if you robot gets stopped before it can reach that distance it just keeps trying to drive forever but never reaching its goal. This means that the next block is never triggered.

I would research PD loops as you can create a myblock similar to the move a distance block while also creating extra exit conditions if the robot thinks it hit an object and can’t move in that direction anymore.

Hope this helps.:slight_smile: