Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Mecanum drive cartesian problems (http://www.chiefdelphi.com/forums/showthread.php?t=133241)

jls667 06-02-2015 11:02

Re: Mecanum drive cartesian problems
 
I am using the wpilib library and robotdrive. I believe that I have to reset the gyro and use getangle.

GeeTwo 06-02-2015 11:25

Re: Mecanum drive cartesian problems
 
Quote:

Originally Posted by jls667 (Post 1439247)
I am using the wpilib library and robotdrive. I believe that I have to reset the gyro and use getangle.

We got our Mecanum Drivetrain Code working in field coordinates in December; click for the code on github. This is based on cRIO, but shouldn't need too much tweaking. This is built on the command based robot model.

cstelter 06-02-2015 13:09

Re: Mecanum drive cartesian problems
 
Quote:

Originally Posted by GeeTwo (Post 1439256)
We got our Mecanum Drivetrain Code working in field coordinates in December; click for the code on github. This is based on cRIO, but shouldn't need too much tweaking. This is built on the command based robot model.

Out of curiosity, why do you drive at 70% joystick readings in cartesian mode but full power in Polar mode?

Is there a purpose to Polar/Cartesian switch? Isn't calling cartesian with gyro-angle==0 equivalent to to calling Polar? Perhaps it is meant to switch between field-centric and robot-centric?

Not sure the CommandBase class will work in this year's lib so it may not just be load/go. Also, I think atan2 is on Math now, not MathUtils because we have proper java this year, so those are the obvious tweaks I see that will be necessary

jls667 06-02-2015 14:48

Re: Mecanum drive cartesian problems
 
I am having trouble finding the java code mentioned by GeeTwo.

cstelter 06-02-2015 15:39

Re: Mecanum drive cartesian problems
 
Quote:

Originally Posted by jls667 (Post 1439362)
I am having trouble finding the java code mentioned by GeeTwo.

Does this work better for you?
https://github.com/frc3946/MecanumDr...libj/templates

jls667 06-02-2015 21:12

Re: Mecanum drive cartesian problems
 
Thank you. That helps.


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

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