# Self correcting autonomous?

I was thinking and I had an idea that I could make an autonomous but if it detected that a cube hasn’t been picked up when it should have then it would keep running the previous line of code until it detects a cube can be picked up and the distance traveled would be noted on the side of the screen. Example: if an autonomous doesn’t run forward long enough it would keep running forward until it detects a cube can be picked up.

1 Like

Well, you would need a way to detect whether or not a cube had been picked up. Do you plan on using limit switches or something?

I was thinking about a bumper switch at the front of the robot.

How would you position it so that the bumper switch doesn’t block the intake?

So for example, in a tray stacker I would put it in the middle of the intakes at the front so as it’s getting pulled up it would push the bumper.

1 Like

But wouldn’t the bumper block the tray opening?
Or does the bumper move up with the cubes?

No, because it would be a bit below the track that the cubes move up.

So like, embedded in the tray?
I was thinking along the lines of limit switches mounted on the sides like so

2 Likes

Actually I like your idea more than my original one. So that would be a revision on my part.

2 Likes

Well, take time to consider your own idea anyways, you never know!

But my question is do you think it’s possible?

It could be, if you recessed the bumper switch into the tray backing like so

3 Likes

Ya I think it’s possible, but one of the problems would be if the sensor blocks the tray.

No, instead of a bumper switch I decided I liked railgunawesome’s idea better and am going to put limit switches in the side.

2 Likes

You could also consider using the vision sensor maybe.

I don’t think my school has them yet, also how would I use them?

First you need to be able to accurately track your position, 3 tracking wheels are best, and calculate where you actually are using some not that hard math. Then, what are you actually trying to detect, if the cube and intake are misaligned you would have no way of knowing, if the cube is a little bit further you could drive forward a little further than the cube. The self correcting does help if you are driving and get misaligned during truing or something, your robot could adjust. The sensor that detects a cube can still be useful. For example if you don’t detect that you picked up a cube you can stop or do something different in you autonomous, or like you said drive forward until you get the cube (make sure to consider what happens if you don’t detect the cube within a certain distance).

Also your thread is tagged as VEX Coding Studio Tech Support, if you are using vex coding studio you should switch to VEXcode, since vex coding studio was discontinued and replaced by VEXcode.

4 Likes

Just one more thing though: I’ve never made a self tracking program, how would I make that?

Read the document on the 5225a aps.

I’m also curious if there are any other resources on position tracking.

3 Likes

I was thinking in terms of eliminating the problem as a whole by using it to track the cube into the claw/ intake, but if you want me advice on how to come up with a solution then the only thing could suggest is maybe a ultra sonic sensor that is reading the value of how close the cube is to the back of the claw and if it falls out then the value goes back up but if it stays in then the value will read it as its in.