|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Questions about mecanum wheels
What is your wheel config?
Here is the code I've done for off season projects, you may want to add dead zones. This also does not have the power problems - Code:
if (ws.ButtonState.Two == true)
{
leftmotorcontrol.motors[0].Velocity = -100 * (ws.AccelState.Values.X - ws.AccelState.Values.Y + turn); // front left
leftmotorcontrol.motors[1].Velocity = -100 * (ws.AccelState.Values.X + ws.AccelState.Values.Y + turn); // rear left
rightmotorcontrol.motors[0].Velocity = 100 *(ws.AccelState.Values.X + ws.AccelState.Values.Y - turn); // front right
rightmotorcontrol.motors[1].Velocity = 100 * (ws.AccelState.Values.X - ws.AccelState.Values.Y - turn); // rear right
}
else
{
leftmotorcontrol.motors[0].Velocity = 0.00;
leftmotorcontrol.motors[1].Velocity = 0.00;
rightmotorcontrol.motors[0].Velocity = 0.00;
rightmotorcontrol.motors[1].Velocity = 0.00;
}
I was using a wiimote so the "joystick values" (Really i used the accelerometers) gave an output of -1 to 1, you get a 0 - 255?. Its really simple just add up the x,y,z(rotation) and give each wheel the values they need.Diagrams help alot. Are you using two or one joystick? Take a look at this thread - http://www.chiefdelphi.com/forums/sh...hlight=wiimote PM me if you need more help |
|
#2
|
|||||
|
|||||
|
Re: Questions about mecanum wheels
A piece of advice that I'd give is to also use a PID controller. This way you can tweak values to however you'd like them. Also makes for smoother control.
Jacob |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need help about Mecanum Wheels | mahmosh | Technical Discussion | 4 | 18-01-2008 11:50 |
| A few Questions about Omni Wheels.... | kSniper | Technical Discussion | 4 | 08-01-2008 00:15 |
| Friction coefficients for Omni wheels and Mecanum wheels from AndyMark | Andy Baker | Technical Discussion | 11 | 16-12-2006 19:40 |
| Mecanum Wheels | chaolin2007 | Control System | 1 | 25-02-2006 19:16 |
| Mecanum Wheels | TheFerret | Technical Discussion | 8 | 16-01-2006 09:23 |