Autonomous Question

alright well im in a situation, we came up with a autonamous mode we think might work, but the problem is that we dont know how to identify movement, an example, if i were to have it make a figure 8 how would i tell it to move in a particular direction.

tell one side of the robot’s wheels to go forward at full speed for X amt of time, and then have the other side to move forward for X, and then guess and check till it works. sorry if this isn’t the format you would like, i just asked one of our programmers and this is what he told me.

It depends. What Jeff is talking about is something like what we did for Overdrive, where we knew the speed we were traveling, the length of the field, and had a closed-loop steering system. This type of autonomous generall works best for situations where

  1. Variables are limited. Since this system can’t account for outside influences, anything unanticipated,(like running into something) will cause severe error
  2. All the details can be programmed(and tested) ahead of time
  3. The maneuver involves few changes in velocity or heading(even assuming no collisions, a small amount of error will accumulate every time you make a change)

Because of this, I would actually recommend aginst this system for a game like this. A figure eight is relativley complicated, and it’s likely that you’ll hit something at some point, as well as the fact that every time you skid you’re going to lose accuracy. I would recommend that you either

1.Pick a simpler manuever and use Jeff’s method, or
2.Use a closed-circuit autonomous. You could, for example, use an encoder or accelerometer to measure ground speed and a gyro to measure heading, which would give you all the info that you needed.

Yeah, dead reckoning isn’t bound to work so well because unlike overdrive, every team will NOT have the same/similar objectives during Autonomous period. Therefore, the mode will somehow need to consider what happens to the robot if it collides and not just continue to drive straight if it gets head on to the wall.

If you want to identify movement you probably want some combination of gyro, accelerometer, and/or encoder sensors. I don’t have much experience with any of these, but:
The gyro should tell you how your robot is turning
The accelerometer should be able to tell you acceleration in two directions, which you can integrate to get speed and again to get position (it can also be useful for other code, like traction control)
Encoder sensors can be mounted with wheels to tell you exactly how much they’re spinning, and you can get distance by counting the ticks and multiplying by a constant factor. Of course, if your wheels are slipping your encoder count won’t match your distance traveled…

If you just want your robot to move, all you need to do is drive the motors like you would in the teleoperated period (although not from a joystick, since you can’t read from those during autonomous).