|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
Quote:
|
|
#2
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
[quote=pastelpony;1438465]Good point. Thanks.
|
|
#3
|
||||
|
||||
|
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;
|
|
#4
|
||||
|
||||
|
Re: Mecanum Single Joystick Control not working
Quote:
|
|
#5
|
|||
|
|||
|
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 |
|
|