Go to Post Don't rely on the field staff to get every ball to work with your machine....engineer a robot that makes the change not matter. - PayneTrain [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 18-01-2011, 21:32
85450 85450 is offline
Registered User
FRC #0662
 
Join Date: Jan 2011
Location: Colorado
Posts: 1
85450 is an unknown quantity at this point
Error in mecanumDrive_Polar of WPILIBJ

We determined that the mecanum drive function has an error. Specifically the line
double sinD = Math.cos(dirInRad);
should be
double sinD = Math.sin(dirInRad);

Can someone provide information on how to get this fixed in the WPILIBJ library.

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2011, 22:07
Patrick Chiang Patrick Chiang is offline
Programming
FRC #3070 (Team Pronto)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Seattle
Posts: 162
Patrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to allPatrick Chiang is a name known to all
Re: Error in mecanumDrive_Polar of WPILIBJ

What we do when this kind of thing happens is just copy the entire FRC supplied class into our package and correct the part that seems wrong. And use the one in our package instead of the one in wpilib.
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2011, 00:03
bakketti bakketti is offline
Registered User
FRC #0443 (Freelance Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Denver, Co
Posts: 18
bakketti is an unknown quantity at this point
Re: Error in mecanumDrive_Polar of WPILIBJ

Good catch! This explains why mecanumDrive_Polar() isn't working. Thanks.
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2011, 09:30
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: Error in mecanumDrive_Polar of WPILIBJ

I added this as a bug at http://firstforge.wpi.edu/sf/go/proj...ilib_java_bugs as artf1315.
Reply With Quote
  #5   Spotlight this post!  
Unread 22-01-2011, 11:52
sfletty sfletty is offline
Registered User
FRC #2846
 
Join Date: Feb 2010
Location: St. Paul
Posts: 1
sfletty is an unknown quantity at this point
Re: Error in mecanumDrive_Polar of WPILIBJ

Does the problem exist in mecanumDrive_Cartesian too? We're seeing similar problems.

This is what we're doing:

drive.mecanumDrive_Cartesian(lstick.getX(), lstick.getY(), rstick.getX(), gyro.getAngle());
Reply With Quote
  #6   Spotlight this post!  
Unread 22-01-2011, 12:34
bakketti bakketti is offline
Registered User
FRC #0443 (Freelance Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Denver, Co
Posts: 18
bakketti is an unknown quantity at this point
Re: Error in mecanumDrive_Polar of WPILIBJ

Quote:
Originally Posted by sfletty View Post
Does the problem exist in mecanumDrive_Cartesian too? We're seeing similar problems.

This is what we're doing:

drive.mecanumDrive_Cartesian(lstick.getX(), lstick.getY(), rstick.getX(), gyro.getAngle());
I have experienced problems with mecanumDrive_Cartesian too. It actually works when I put a fixed 0 degrees or 180 degress in the angle input. However, other values have not worked for me (from what I remember). I have spent some time trying to figure out the problem. No luck yet. But rotateVector() in RobotDrive is okay. Our team got field relative driving running by using rotateVector() to manually transform coordinates.
Reply With Quote
  #7   Spotlight this post!  
Unread 22-01-2011, 18:41
7519534682 7519534682 is offline
Registered User
FRC #3125
 
Join Date: Jan 2011
Location: CT
Posts: 1
7519534682 is an unknown quantity at this point
Re: Error in mecanumDrive_Polar of WPILIBJ

Is there any way to get a working mecanum drive until mecanumDrive_Polar() is fixed?
Thanks
Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2011, 18:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,986
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Error in mecanumDrive_Polar of WPILIBJ

Quote:
Originally Posted by 7519534682 View Post
Is there any way to get a working mecanum drive until mecanumDrive_Polar() is fixed?
Thanks
You could write your own. It's not that hard. Here's some help.



Last edited by Ether : 22-01-2011 at 18:58. Reason: fixed link
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2011, 19:35
MattG_3165 MattG_3165 is offline
Registered User
FRC #3165 (Newbots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Oregon
Posts: 16
MattG_3165 is an unknown quantity at this point
Re: Error in mecanumDrive_Polar of WPILIBJ

Quote:
Originally Posted by 7519534682 View Post
Is there any way to get a working mecanum drive until mecanumDrive_Polar() is fixed?
Thanks
There sure is, Patrick explained how in post #2:

Quote:
Originally Posted by Patrick Chiang View Post
What we do when this kind of thing happens is just copy the entire FRC supplied class into our package and correct the part that seems wrong. And use the one in our package instead of the one in wpilib.
Reply With Quote
  #10   Spotlight this post!  
Unread 24-01-2011, 11:46
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Error in mecanumDrive_Polar of WPILIBJ

attatched should be enough to be a better mecanum drive with no black box

http://www.chiefdelphi.com/forums/at...9&d=1295551765
Reply With Quote
  #11   Spotlight this post!  
Unread 27-01-2011, 15:11
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 586
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Error in mecanumDrive_Polar of WPILIBJ

Quote:
Originally Posted by 85450 View Post
We determined that the mecanum drive function has an error. Specifically the line
double sinD = Math.cos(dirInRad);
should be
double sinD = Math.sin(dirInRad);

Can someone provide information on how to get this fixed in the WPILIBJ library.

Thanks!
You just did get it fixed. Will be in the next release. Thanks for the patch!
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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 09:39.

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