Right now we are working on our Autonomous with Vision tracking. We are trying to figure out if it is possible to drive the robot forward while tracking the peg at the same time. (this auto is for steamworks, placing a gear to be more specific) For the past while we have been driving, stopping, tracking and repeat. Much help would be appreciated, Thank You!
~Team 935 Software group.
The simple way is to simply drive forwards while using a PID controller with the input being the error between the robot’s current heading and the peg (usually a gyro is used so you have a fast refresh rate for this), then have the output of the controller turn the robot. You could probably use RobotDrive.ArcadeDrive for this.
Absolutely! It’s easiest to start of at a slow speed (say 1 ft/s) and tweak the effects of the peg being in the wrong place while you’re moving slowly enough to see what’s going on. Then increase the speed in steps of say 50%, tweaking as you go until you reach a speed you find adequate.
If you were wondering what their ideas looked like in Labview, here you go.
This is in Autonomous Independent.vi
And this in Vision Processing.vi
With some values going trough Robot Global Data.vi
You can download the code (linked in my signature) if you want to take a closer look at it. Keep in mind that our robot goes sideways while going for the peg and we use meccanum so it doesn’t rotate.