|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#31
|
||||
|
||||
|
Re: Autonomy: How Did You Guys Do It?
We use a combination of line tracking and ultrasonic rangefinding. Our robot follows the line at about 40% speed and then slows to 20% when it reaches around 60inches away from the wall. We have a lot of fun starting our robot totally crooked and watching it straighten itself out. Also we are using position control for the arm with the E4P encoder in the KOP
|
|
#32
|
||||
|
||||
|
Re: Autonomy: How Did You Guys Do It?
Quote:
We turn the robot into a rolling PID Loop and just start executing commands to the PID controllers. Arm Length and Tilt PID for HighMiddle Ultrasonic & Gyro PID to 36" from the wall. Ultrasonic & Camera PID to the peg tube 1 Reverse Claw Arm Length & Tilt PID to home Arm Length and Tilt PID for Front Pickup Run Claw Intake Strafe Wheel Pods & Encoder PID infront of tube 2 Drive FWD until the claw detects a tube Arm Length & Tilt PID to HighEndPeg Ultrasonic & Gyro PID 36" from the wall Ultrasonic & Camera PID to the Peg Arm Length & Tilt PID to home Reverse Claw If you watch the video you can see each step: Video Last edited by Kingofl337 : 17-03-2011 at 17:16. Reason: added video |
|
#33
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
Are you using the gyro to keep you straight if the robot veers? I feel like that would be a common occurrence with the bumps in the field and a swerve drive.
|
|
#34
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
I used a for loop that drove forward and raised the arm at set speeds. Piece of cake.
|
|
#35
|
||||
|
||||
|
Re: Autonomy: How Did You Guys Do It?
We had the whole grand plan: Camera tracking, line following, PID loop. Unfortunately, none of our optical encoders could be coerced to work, despite constant replacements. And the camera made the C-RIO crash.
So now we have a "drive forward, lift up, open grabber" auto. |
|
#36
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
are you using the newest camera? if so you need to use a non-crossover cable to connect it to the crio to prevent it from crashing..thats how we fixed our problem
|
|
#37
|
||||
|
||||
|
Re: Autonomy: How Did You Guys Do It?
We had many combinations of sensors to make the auto work but in the end, we went with line sensors, ultra sonic and pot on the arm.
We start the auto by line tracking at about 8ft/s and stopping the base at some distance away from the wall. While it's line tracking, our arm moves to the high goal preset. Once it reaches the target distance, it starts to orient the tube & de-suck it out of the rollers. And the arm is slightly lowered too. ![]() I tried using gyro but due to sensor inefficiency, the gyro reading would keep increasing even if the robot's not moving. I was told that it happens with all gyros and it shouldn't make a big difference in the 15-20 second autos... |
|
#38
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
Quote:
It will always drift slightly. If you're noticing big changes it's likely that the robot was moving when the gyro initialized and biased. If that happens it will constantly think it is in motion afterwards. Make sure that it's completely still during boot up. |
|
#39
|
||||
|
||||
|
Re: Autonomy: How Did You Guys Do It?
Quote:
On that note, how often do other programmers call for inputs from sensors during autonomous and teleop periods? I've always called it at the beginning of every iteration but not sure if calling it every other iteration would made a huge difference. |
|
#40
|
||||
|
||||
|
Re: Autonomy: How Did You Guys Do It?
Quote:
We ubertubed 15/16 matches at Peachtree. Line tracking is working great for us ![]() |
|
#41
|
||||
|
||||
|
Re: Autonomy: How Did You Guys Do It?
We developed camera tracking and have used gyro in previous years but this year we found that the line sensors were very reliable as long as they are calibrated properly to the field. The lights on the front of the sensors make them very easy to calibrate manually when sliding the robot from side to side over the lines.
Our robot has KoP quad encoders for each of the mechanum wheel modules, so we know how far the robot has travelled forward. There is code to detect if an encoder is providing unreliable values, hence excluding it from calculation. Typical problems are no signal due to wiring problems or physical encoder damage. We do have an encoder on the elevator, but we have found the most reliable method is to drive the elevator to the top and check the current draw from the motor via CAN. As soon as the elevator gets to the top, the motor starts to stall, increasing current draw which we detect and stop the motor. This method also help if we are get too close and hit some other part of the peg grid structure since it will stop the elevator, rather than unsuccessfully trying to drive it through the grid to a preset point. The code is written in Java in the autonomousPeriodic() method as a state machine, with timeouts on many states to allow for sensor failures. Summarizing: line sensors for direction, quad encoders on drivetrain for distance travelled, current draw from elevator motor and timing for pneumatics. Ultrasonic range finding would be a helpful addition. The biggest problem was lack of access to a real field to test out the system. In particular we had extremely limited access to the practice field during our Regional. Testing by watching the system perform during a match is a very public way of finding bugs, which I do not recommend for the thin-skinned. Last edited by MikeE : 20-03-2011 at 13:26. Reason: improved clarity & fixed typos |
|
#42
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
We recorded our joystick inputs to a file on the cRIO and played them back, it worked amazingly well. Heres a link to my program http://www.chiefdelphi.com/forums/sh...ad.php?t=93720
|
|
#43
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
Sigh... I guess I will have to go with the blind man way... Autonomy with only encoders. Hey, but at least it is so easy to program that.
|
|
#44
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
Did you write your own encoder code?
|
|
#45
|
|||
|
|||
|
Re: Autonomy: How Did You Guys Do It?
No, because I have no access to the FPGA. I read that all the encoder calculations basic are done on the FPGA and that the WPILib is just an interface with the FPGA. Even if I write my own program to interface with the encoders, the FPGA has to be the middle man. I can't do anything if the FPGA is doing the internal calculations all wrong.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|