|
|
|
![]() |
|
|||||||
|
||||||||
A deadband that changes with joystick input.
This deadband uses perceptrons to change itself based on user input. Download the source code below. Because I know not everyone has a joystick and Windriver at home, this code instead can be compiled in any standard C++ compiler. It will take the input as a integer from the console rather than the joystick. Feel free to play around with it as you please and let me know if you have any great new ways to use this.
Perceptronic Deadband.zip
05-08-2014 12:45
E DawgWhat is it?
A deadband that changes itself based on the user input using perceptrons. For example, if the driver is constantly providing maximum input, the deadband change to increase the threshold. If the driver is providing low input, the deadband will change to decrease the threshold.
What are perceptrons?
Perceptrons are a form of learning AI that mimics a human brain cell. It can take any number of inputs. It then modifies each input by an individual weight. This weight is what is modified as the perceptron learns. The weighted sum is then passed through an activation function to either 'fire' or not. The equation for changing the weight is as follows:
W(n) = W(n+1) + η(d(n)-y(n))*x(n)
Above W(n) is the old weights vector, W(n+1) is the new weights vector η is a user-defined constant called the teaching step, d(n) is the target vector, y(n) is the actual output of the network and x(n) is the corresponding input.
Like a neuron, perceptrons can also be linked together. This deadband only uses one perceptron, however.
You can download the source code above.
05-08-2014 12:57
Jared Russell
What problem is this a solution for?
05-08-2014 12:58
AllenGregoryIV
I haven't looked through the code but this sounds very cool. My only questions is what problem does this solve? Were you having control issues or something and this fixed them?
05-08-2014 13:05
E Dawg
05-08-2014 13:25
Chris is meIf I understand this correctly, this would change the response of the joysticks in real time (i.e. throughout a match)? I feel like this, while very cool, wouldn't be optimal simply because the same input at different times would produce different results. Practicing maneuvers and getting them to the point where you just use muscle memory to drive the robot would be pretty much impossible.