Drive Smoothness Question

So, as the programmer for my team, I am naturally trying to make our drivetrain as smooth as possible. Hypothetically, if I removed the default drive controls from our controller and added this image, what would happen?
Would anything be improved? Smoothed out, etc? Also, since I just left it as “forward” and “right”, is there a way to get negative values from them and move backwards and left?

If if or if not, either way, does anyone have some tips to making the drive smoother in code?
Thanks a lot, I would really like this help.

You should look into joystick curves:

For the code you are showing, that’s not a good way of doing drive control.

I am using VEX V5 (As stated in the tags of this post.) I have zero access to VEX V5 Pro,

You can have drive controls that are not directly proportional to the joystick deflections even with VEXcode blocks. Here is a link to a post I made in December about it…

you could play with the equation if you want to adjust it, but make sure that a 100% deflection still gives you an output of 100% power.

Do you have a version for V5 C++? That is what I use.

I could… but you’ll probably understand the concept more if I don’t post it exactly ( and I’m one of those annoying teachers, not a student). The important concept is that you do not set the motor speeds to be the exact deflection of the joystick. you set the motor speeds to a calculation based on the joystick deflection. There are many options, but the simple one I showed in block code is to …

multiply the joystick value by its absolute value and then divide by 100.

  • dividing by 100 ensures full deflection gives 100% output
  • signal will rise slowly at first, but then more quickly
  • if you only square the joystick value, you lose negative values
  • if you just multiply the deflection by itself you also lose negative outputs
  • using a single absolute value will keep the output the same sign as the input joystick deflection without using if-loops and multiple formulas.

in VEX code pro, you might have something like this…

code 3

1 Like

what would a full line of this code look like?
something like