|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
Re: Error in mecanumDrive_Polar of WPILIBJ
Good catch! This explains why mecanumDrive_Polar() isn't working. Thanks.
|
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
|||
|
|||
|
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()); |
|
#6
|
|||
|
|||
|
Re: Error in mecanumDrive_Polar of WPILIBJ
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.
|
|
#7
|
|||
|
|||
|
Re: Error in mecanumDrive_Polar of WPILIBJ
Is there any way to get a working mecanum drive until mecanumDrive_Polar() is fixed?
Thanks |
|
#8
|
||||
|
||||
|
Re: Error in mecanumDrive_Polar of WPILIBJ
Quote:
Last edited by Ether : 22-01-2011 at 18:58. Reason: fixed link |
|
#9
|
|||
|
|||
|
Re: Error in mecanumDrive_Polar of WPILIBJ
Quote:
|
|
#10
|
||||
|
||||
|
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 |
|
#11
|
|||
|
|||
|
Re: Error in mecanumDrive_Polar of WPILIBJ
You just did get it fixed. Will be in the next release. Thanks for the patch!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|