|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
For some reason, it seems as the inputs in the default mecanum code are inverted for some people, including myself. I'm not sure if this occurs for everyone, but just try to play with your joystick inputs and inversions. I personally had to edit the default code to get the wheels to spin the right way. You probably don't have to.
|
|
#2
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
If by "play with your joystick inputs" you mean "wire the joystick values to the wrong inputs on the robot drive vi", that should never be necessary... and it makes your code confusing and difficult for others to help you.
Quote:
|
|
#3
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
Quote:
|
|
#4
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
[quote=pastelpony;1438465]Good point. Thanks.
|
|
#5
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
Quote:
I don't have access to LabVIEW to inspect its code, but here's the inverse kinematics code taken straight from 2015 WPILib RobotDrive.Java: Code:
wheelSpeeds[MotorType.kFrontLeft_val] = xIn + yIn + rotation;
wheelSpeeds[MotorType.kFrontRight_val] = -xIn + yIn - rotation;
wheelSpeeds[MotorType.kRearLeft_val] = -xIn + yIn + rotation;
wheelSpeeds[MotorType.kRearRight_val] = xIn + yIn - rotation;
|
|
#6
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
Quote:
|
|
#7
|
|||
|
|||
|
Re: Mecanum Single Joystick Control not working
I compared the LV code to the attached Java, and they are the same.
The LV code first does a gyro transformation in case you have one and want to use field coordinates. The code then uses the same expressions on the same inputs with the same output names. The code then normalizes the motor outputs. If you have an issue with the code, can you be more specific about what was wrong with it? Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|