|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
![]() That picture should make it fairly obvious. If not, look below. mainJoy is the one used for forward/back and strafing, rotJoy is used for rotation (pretty much like a FPS game, we even wired our camera's tilt up to rotJoy's Y axis so it is exactly like the usual FPS controls ) For best results, use an Xbox/PS3 controller. Remember forward is -1.Assuming you get -1..1: front_Left = -mainJoy.getY() - rotJoy.getX() + mainJoy.getX() front_Right = -mainJoy.getY() + rotJoy.getX() - mainJoy.getX() back_Left = -mainJoy.getY() - rotJoy.getX() - mainJoy.getX() back_Right = -mainJoy.getY() + rotJoy.getX() + mainJoy.getX() |
|
#2
|
||||
|
||||
|
Re: how to program mecanum wheel drive?
Quote:
1) I would think it would be more intuitive if pushing rotJoy to the right would cause clockwise rotation*. 2) You need to normalize the 4 wheel commands, in a way that preserves their holonomic relationship, before sending them to the motors. * I am assuming that the motors are set up so that issuing a + command causes the wheels to rotate in the "forward" direction |
|
#3
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
Quote:
Didn't know about the handy PDF, though. Thanks ![]() |
|
#4
|
||||
|
||||
|
Re: how to program mecanum wheel drive?
Quote:
Code:
front_Left = -mainJoy.getY() + rotJoy.getX() + mainJoy.getX() front_Right = -mainJoy.getY() - rotJoy.getX() - mainJoy.getX() back_Left = -mainJoy.getY() + rotJoy.getX() - mainJoy.getX() back_Right = -mainJoy.getY() - rotJoy.getX() + mainJoy.getX() |
|
#5
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
so, how do I program this? |
|
#6
|
||||
|
||||
|
Re: how to program mecanum wheel drive?
Just like any other motor: it depends on what you want to do with it.
|
|
#7
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
ok, thanks
|
|
#8
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
our team is trying to use the relay to control the window motor, how do we program this?
|
|
#9
|
||||
|
||||
|
Re: how to program mecanum wheel drive?
Quote:
Last edited by Ether : 20-02-2011 at 17:15. |
|
#10
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
edit: where do we put the program in?
Last edited by sonicwingmode : 20-02-2011 at 17:25. |
|
#11
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
the help here is awesome!
|
|
#12
|
|||
|
|||
|
Re: how to program mecanum wheel drive?
where do we find "Button 1"
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|