How do we fix the invert controls so that when we turn left, the robot also turns left.
Does the robot go forward and backwards according to what you would expect?
Are you using arcade drive? If so you could just negate the rotation input and that would probably be the easiest fix.
I’m not very knowledgeable in LabVIEW so I don’t exactly understand what’s the drive control used here. From your question, I assume arcade drive (joystick Y controls forward/back speed, joystick X controls rotation)? It all boils down to inverting number signs after all…
You can invert/negate the rotation input, that should work.
Is Tank drive the same as arcade drive?
No. Tank drive takes an input for the left side speed and an input for the right side speed. Arcade drive takes an input for the forward speed and an input for the turning rate. They basically work like this (real implementations are a little more complicated):
// Tank drive
left = joystick1.GetY()
right = joystick2.GetY()
leftMotor.set(left)
rightMotor.set(right)
// Arcade drive
forward = joystick1.GetY()
turn = joystick2.GetX()
leftMotor.set(forward - turn)
rightMotor.set(forward + turn)
where would I find that, im new to this and didn’t create it so i’m not sure where i would go to change it.
I’ve never used LabVIEW, so I don’t know. I was just demonstrating the difference between the two drive schemes with some pseudocode.
Do you know where you would go to change it in Labview. I didn’t create it so i’m not sure where to find it.
Yes assuming you haven’t changed a lot of things you will go to Teleop.vi and look for the code below. You will right click where I placed the red dot and choose Insert navigate to the math palette and choose negate. It looks like a triangle with a minus sign in it.
See how it has negate on the bottom line. That is the Y axis or straight input. I was asking for an invert on the x axis or the rotation input which is the orange line above it.
Should we remove the negate that was already there or leave it alone?
Leave it please. The controller you are using sends negative signals when the joysticks is moved forward and positive backwards so that negate is correcting for that.
After doing this you either deployed to the robot or built and ran as startup?
I’m not sure, I thought it automatically applies to the frc driver station after you save it or is that not the case?
No all code changes must be deployed to the robot. See this article
You also might find this page and the other articles around it helpful
Should we be worried about a error code saying theres too much code for the joystick?
Can you give the exact error text or a screenshot?