Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Mecanum Drive (http://www.chiefdelphi.com/forums/showthread.php?t=94109)

Alan Anderson 30-03-2011 13:06

Re: Mecanum Drive
 
Quote:

Originally Posted by Ether (Post 1047367)
In the code Tanis posted, the "velocity" command would be negative when you want the wheels to spin in the forward direction.

You're apparently coming at this from an academic perspective rather than a practical one. The posted code might look "backwards" to you, but it's exactly the way it should be. That's because of how USB joysticks -- and the FRC control system -- work: forward is negative. It's an annoying standard from a wheeled vehicle point of view, but it's quickly learned.

Ether 30-03-2011 14:04

Re: Mecanum Drive
 
Quote:

You're apparently coming at this from an academic perspective rather than a practical one. The posted code might look "backwards" to you, but it's exactly the way it should be.
I think we agree on this: the code Tanis posted can be made to work by inverting the motor commands after they've been calculated or by wiring the motors so that a positive command to the motor controller produces a backwards wheel speed.

Whether or not it "should" be done this way is certainly arguable.


For some people, it might be considerably more intuitive to invert the Y-axis value to make it positive for forward motion, and use equations which produce a positive wheel speed command when the wheel needs to spin in the forward direction.

I have edited my earlier post to remove the word "should" from it and to better convey the point.



kaliken 30-03-2011 14:20

Re: Mecanum Drive
 
Quote:

Originally Posted by Robby Unruh (Post 1047116)
I think it was 294 last year who had mecanum wheels on Einstein.

Nope... we were 6 wheeled Tank driven.. Probably will be for many more years to come..

Edit: saw that my student lead already posted... nicely done Alex..

Alan Anderson 30-03-2011 14:28

Re: Mecanum Drive
 
Quote:

Originally Posted by Ether (Post 1047432)
I think we agree on this: the code Tanis posted can be made to work by inverting the motor commands after they've been calculated or by wiring the motors so that a positive command to the motor controller produces a backwards wheel speed.

The thing is, a positive input to a WPI drive function does represent a backwards wheel speed.

Quote:

For some people, it might be considerably more intuitive to invert the Y-axis value to make it positive for forward motion,...
I agree completely. However, the WPI library was written to comply with the HID joystick standard, and not to invert the axis to make it more intuitive. If you invert it yourself, you'll have to invert it again before passing it to the arcade/tank/mecanum drive function, which expects the noninverted Y axis input. That ship has sailed (this year, at least).


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

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