|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mecanum and Gear Ratios
We have a slight problem... we are using mecanum wheels this year, and there is a different gear ratio for the front set of wheels than for the back set. The front set are 4.67:1 and the back set are 12.75:1. We are using the mecanumDrive_Cartesian() method (Java w/netbeans). How can we modify the speed of the front wheels easily?
|
|
#2
|
|||||
|
|||||
|
Re: Mecanum and Gear Ratios
I don't think that's something you want to fix with software.
|
|
#3
|
|||
|
|||
|
Re: Mecanum and Gear Ratios
I know it's not ideal, but we don't really have the time to fix the gear ratios at this point. I am just hoping there is a possibility we can fix this with software
![]() |
|
#4
|
|||||
|
|||||
|
Re: Mecanum and Gear Ratios
It might be a little difficult with software, since the torque applied to each wheel is different. You could try scaling the back wheels down by 4.67/12.75, by simply multiplying the motor output by that ratio. Small signals to the motors will most likely have a strange affect on them as well; it's kind of a strange situation. Just make sure you have the right transmissions ready to swap in for your first regional.
|
|
#5
|
|||
|
|||
|
Re: Mecanum and Gear Ratios
I do not know how to modify the speed of the motors without making new motor objects and recreating the entire mecanum_DriveCartesian method. Is there any other way?
|
|
#6
|
|||||
|
|||||
|
Re: Mecanum and Gear Ratios
So you're running two CIMple boxes and two Toughboxes?
This is a problem screaming for a hardware fix. The negative side effects can be mitigated in software, but you'll likely have to use encoders and velocity-PD controllers for each of the four wheels to maintain consistent output velocities. While I am not familiar with the supplied Java mecanum drive framework, it may be necessary to write your own mecanum drive code to achieve these objectives. The best solution is to call up other local FRC teams and see if you can trade either the CIMple or Toughbox gearboxes to have four identical gearboxes. Most FRC teams are more than willing to trade (equal valued) spare parts to help other local teams. |
|
#7
|
|||
|
|||
|
Re: Mecanum and Gear Ratios
Quote:
Let me know if you need details, I don't have the wpilib src with me but can post something tonight. Good luck! |
|
#8
|
|||
|
|||
|
Re: Mecanum and Gear Ratios
Thanks guys. We're going to try to get some Toughboxes from a team in our area that isn't competing this year, but if not we will probably have to try and do it in the software.
I was actually going to try and scale down the Y value of the joystick when the front motors speed calculations were taking place (in RobotDrive.java), but I can't figure out how to modify it. Is it read-only because it's part of the wpilib libraries? And if so, can I make it not read-only somehow? |
|
#9
|
|||
|
|||
|
Re: Mecanum and Gear Ratios
Quote:
You can modify RobotDrive.java in NetBeans, open wpilibj as a project, edit the file (back up or comment out the original code), and build the project as normal. (Don't make it your main project when opening) |
|
#10
|
|||
|
|||
|
Re: Mecanum and Gear Ratios
Quote:
Edit: Nevermind, I just realized. The X and twist axes are definitely going to need to be scaled as well. Thanks for saving me from grief later on ![]() Last edited by HarryScheiner : 02-17-2011 at 02:10 PM. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|