Go to Post This system sucks more than our ball possession system. - IndySam [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2011, 17:52
HarryScheiner HarryScheiner is offline
Mentor for Team 1358
FRC #1358 (MacArthur Generals)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: New York
Posts: 18
HarryScheiner is an unknown quantity at this point
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2011, 18:20
TheOtherGuy's Avatar
TheOtherGuy TheOtherGuy is offline
Unregistered User
AKA: Kevin Forbes
FRC #4183 (Bit Buckets)
Team Role: Engineer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Tucson, AZ
Posts: 408
TheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond repute
Re: Mecanum and Gear Ratios

I don't think that's something you want to fix with software.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2011, 18:25
HarryScheiner HarryScheiner is offline
Mentor for Team 1358
FRC #1358 (MacArthur Generals)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: New York
Posts: 18
HarryScheiner is an unknown quantity at this point
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
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2011, 18:34
TheOtherGuy's Avatar
TheOtherGuy TheOtherGuy is offline
Unregistered User
AKA: Kevin Forbes
FRC #4183 (Bit Buckets)
Team Role: Engineer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Tucson, AZ
Posts: 408
TheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond repute
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.
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2011, 18:46
HarryScheiner HarryScheiner is offline
Mentor for Team 1358
FRC #1358 (MacArthur Generals)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: New York
Posts: 18
HarryScheiner is an unknown quantity at this point
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?
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2011, 19:15
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
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.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
Reply With Quote
  #7   Spotlight this post!  
Unread 17-02-2011, 11:42
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Mecanum and Gear Ratios

Quote:
Originally Posted by HarryScheiner View Post
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?
I completely agree with the above that this is a HW problem and should be addressed that way ASAP. If you must adjust in SW you can scale the motor values in the wpilibj method rather than creating your own drive routine. Keep in mind not to let values get above/below 1.0/-1.0 and that any changes will be overwritten by updates. But if you keep those in mind it is probably easiest as it just requires multiplying by constants in one spot.
Let me know if you need details, I don't have the wpilib src with me but can post something tonight.

Good luck!
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2011, 13:56
HarryScheiner HarryScheiner is offline
Mentor for Team 1358
FRC #1358 (MacArthur Generals)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: New York
Posts: 18
HarryScheiner is an unknown quantity at this point
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?
Reply With Quote
  #9   Spotlight this post!  
Unread 17-02-2011, 14:06
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Mecanum and Gear Ratios

Quote:
Originally Posted by HarryScheiner View Post
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?
Scaling only the Y won't be sufficient to give you proper control.
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)
Reply With Quote
  #10   Spotlight this post!  
Unread 17-02-2011, 14:07
HarryScheiner HarryScheiner is offline
Mentor for Team 1358
FRC #1358 (MacArthur Generals)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: New York
Posts: 18
HarryScheiner is an unknown quantity at this point
Re: Mecanum and Gear Ratios

Quote:
Originally Posted by omalleyj View Post
Scaling only the Y won't be sufficient to give you proper control.
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)
Ah, thank you! I will try this next time we work on it. Why wouldn't scaling the Y value be enough?

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 : 17-02-2011 at 14:10.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi