![]() |
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
Download "The Secret Book of Labview v1.0" here and go to page 25 (page numbered 20, page 25 of the PDF) and try to implement the "boxcar filter" - that will be your moving average that you need for your bias calculation. Quote:
Quote:
|
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
Edit: There is a convenient int in the Gyro class (Java) called m_center. All you would have to set that variable to voltage of the analog channel at the start of the match. Unfortunately it is set at the default access level without a modifier method, so you would have to extend the gyro class (or just make a slight modification to your version of the WPILIB). |
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
|
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
|
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
1) Reset and init an accumulator on the channel the gyro is plugged in to. 2) Wait 1 second 3) Turn on the accumulator 4) Wait 5 seconds 5) View the 'value' of the accumulator (a 64b long) and the count of samples taken to get there. 6) Find the average voltage per sample, set that as the new 'center' for the accumulator. 7) Reset the accumulator When you ask for an angle reading, it just reads the current 'value' out of the accumulator and scales it to a human understandable value. m_center holds a local copy of what got written into the FPGA's accumulator as the 'center'. It is just a cached value used to convert the last few average samples on the ADC to a measurement with correct units in getRate. (Remember, the accumulator is doing the heavy lifting for measuring position). Writing to m_center won't really help here. I don't know why WPILib chose to wait for 5 seconds to denoise the sensor. It seems like this can be done in WAY less samples (like, 10ms). |
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
|
Re: Penalizing mecanum wheeled robots durring alliance selection.
I don't think drift is all of the problem. This year we used the KOP gyro for autonomous. Drift is no problem for this short period. Back in 2012 we never got an acceptable field centric working. 2 weeks ago the programming team developed field centric code again. Put it on the robot with the kop gyro and with some adjustments in code it works fairly well. Most of the testing was done at low velocity checking rotations and stuff. Yes, there was drift but, not excessive. Would be fine for a 2 minute match. Last wed. The drivers tried the field centric code and when the robot is driven hard the the way swerve should be, The gyro goes nuts. Large 10 15 20 30 40 degree swings in 10 to 15 seconds in both rotational directions. The drivers where practicing figure eights. Had to put robo centric back on for the rest of the night. This has to be some thing other than drift. Acceleration affecting the gyro rate? We have some other digital gyros to test. Just have to figure out and program them into the c-rio. We need a rock solid orientation to use field centric in competition. Is this a swerve issue, how do other teams do it.
|
Re: Penalizing mecanum wheeled robots durring alliance selection.
Could the gyro have been saturated?
|
Re: Penalizing mecanum wheeled robots durring alliance selection.
Just to pile onto a thread that was once about mecanum robots.
The LabVIEW WPILib code is just as open as C++ and Java, and is in fact even easier to modify or use as a template to write your own stuff. By the way, it is highly likely that the WPILib code will be modified to incorporate better calibration for 2015. The implementation in WPILib is simple, but not entirely incorrect. If your team relies heavily on the gyro, you can better characterize your sensor and customize the calibration to your setup. Greg McKaskle |
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
Consider also the possibility that you have an electrical issue. Signal noise picked up from motor wiring on the gyro analog signal will be accumulated as errors in the gyro angle. Make sure your sensor wiring is not running alongside power wiring. |
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
Or do I have to put something in auto and tele that wires true to the visitedEnabled global? |
Re: Penalizing mecanum wheeled robots durring alliance selection.
Quote:
Actually, we usually just wire a TRUE constant into visitedEnabled in Teleop and our Auto code. That makes it much easier. (EDIT: Sorry for the issues. The site is having attachment problems. I should be able to post it in the morning unless the site problems persist.) |
Re: Penalizing mecanum wheeled robots durring alliance selection.
1 Attachment(s)
Here we go:
|
| All times are GMT -5. The time now is 06:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi