Autonomous stopping mid-code

Recently, our team has been working on our autonomous program. Our program is designed to drag the neutral mobile goal in front of where the robot has been placed back into the home zone.

Our program works perfectly up to the point where it is supposed to drive in reverse. After that point, the robot stops and doesn’t move backwards. I’ve tried almost every solution under the sun, and nothing has worked. If anyone has any ideas on what could be going wrong, please share!

1 Like

Most likely, it is getting “stuck” on the “drive forward line for 50 inches” because something physically stops the robot from going the full 50 inches…so it just sits there waiting.

3 Likes

We’ve already tried that. The robot isn’t getting stuck on anything as far as we can tell, and it is going the full 50 inches (we have measured this).

If you pick your bot up during the “drive forward” segment, does it “reverse” after it thinks it has gone 50 inches?

1 Like

No, it doesn’t. (20 char)

Hmmmm…someone who knows IQ blocks is going to have to weigh in…I was hoping for the most common problem.

3 Likes

Alright, thanks for your help! I really appreciate it!

1 Like

The code looks fine. I can’t see any issues with it and I’ve been using block codes that work almost the exact same way for 6 years.

1 Like

Ok. We’ve been thinking that it may be a motor problem, but our driver control program has never had any issues going backwards/forwards.

Did you download it at any point before you added the reverse block? If so did you redownload it after?

We redownloaded it after we added it. Heck, we’ve probably downloaded it at least 30 times trying to get it to work!

From what you said it doesn’t sound like a motor issue but im not sure what else it could be.

Dang, I’m not sure, sorry! I hope you figure it out. Sorry I couldn’t be of more help.

2 Likes

You’ve done quite enough! Thank you so much for your help!

Add some diagnostics to test your code. In the example below I added Print to screen and a Play Sound. If the code is working it should play a sound before moving in reverse. If it doesn’t then there is a problem in the code before the sound.

image

3 Likes

Thanks! I’ll try that. (20 char)

have you tried just making the motors run reverse by itself? than slowly adding back the code until it doesn’t work? i know it can be quite tedious, but that is how i have fixed problems that no one could find.

1 Like

If you have a inertial sensor it might need a few seconds before you run the auton to let the sensor calibrate. My team has to let our program run for 2 seconds before we can run the program.

1 Like

Yeah, we have done that. I think in the end we’ve determined that it may be a problem with our encoders. We’ve been doing all sorts of testing, and in the end, nothing really works. It’s baffled us, our mentor, our sister team, and everyone we’ve talked too. Thank you all for your help, I really do appreciate it!

We don’t have an inertial sensor on our robot, but thanks for the suggestion!