![]() |
Mecanum Drive
So I'm planning on using the mecanum drive system for next year.
and just to get a head start, i want to start coding now. so what is a basic structure for omni-system drive? if you guys give me some helpful advice and pseudo code and also some help on correcting human errors and all i will be thankful haha :) |
Re: Mecanum Drive
Come talk to me during snack.
|
Re: Mecanum Drive
Quote:
|
Re: Mecanum Drive
Why in the world are you planning on using one type of a drive system for next year?
There are teams that will laugh at Mecanum regardless of the game. Some pull it off with the right implementation, but I don't think you should say you're planning on using Mecanum for next year. If it's for educational purposes, sure, we'll help you out... I'm not just saying, just sayin' |
Re: Mecanum Drive
Quote:
By the way, he has no power what so ever to make such drastic decisions. Even I do not have such powers. I can convince, but not mandate what drive we should use. |
Re: Mecanum Drive
Quote:
Quote:
Ignoring the last sentence... THIS! Saying that would be like saying "I'm going to use an elevator." You COULD do it but it may not be the best option. Now, having it in your bag of tricks is nice so for an off season project? Go For It! What do you mean by the last sentence? |
Re: Mecanum Drive
Quote:
|
Re: Mecanum Drive
Quote:
we did not decide anything on next years drive and my team's adviser allowed me to play with some drives so i was just asking :) i guess my word choice was bad :P |
Re: Mecanum Drive
Quote:
http://www.chiefdelphi.com/media/papers/download/2906 Or use the provided mecanum drive in the WPI Library. |
Re: Mecanum Drive
Have mecanum wheels ever touched Einstein?
|
Re: Mecanum Drive
Quote:
|
Re: Mecanum Drive
Are team has used mecanum for the last 2 years, never again. Look in to swerve if anything but as an off season project GO for it!!! it will be a fun programming challenge plus there reallllyyyyyy fun to drive up and down the hall ways (we take our 2011 robot out and do figure-8's during lunch)
|
Re: Mecanum Drive
Quote:
As far as I know mecanum has never shown up on Einstein, but I could very well be wrong |
Re: Mecanum Drive
its actually relatively simple, assuming u know trig
Essentially what need to be done is get the direction based upon a 180 degree circle, find the vectors, multiply it by the magnitude of the joystick, and then finally adding or subtracting the rotation |
Re: Mecanum Drive
Quote:
|
Re: Mecanum Drive
Quote:
|
Re: Mecanum Drive
For an off season project, if you have some tetrix or vex metal laying around from the mini bot effort, you could get these wheels and test it out.
http://www.sparkfun.com/products/10543 Drive them with the smoked motors that can be repaired. Your team has a few don't they? When our team decided that we were serious about swerve, we built a vex swerve proto type with a c-rio controller on it. It was a really good learning experience. http://wiki.team1640.com/index.php?t...el_Pivot_Drive |
Re: Mecanum Drive
so can you guys give me some pseudo code for mecanum and swerve drive?
mecanum, im getting some idea and i think i can do it but swerve.. i have no idea how i should even start coding that thing. all i want is basic structure of those drive system and how pwm feed should be from joystick, etc. thank you :) |
Re: Mecanum Drive
Talk to your team also to get input on this very abtuious project you want to embark on! But you should use CAN to connect your jags it updates muchhhh faster and allows for a much smoother mecanum drive and swerve drive, If you have any can questions pm me.
|
Re: Mecanum Drive
Oh man... Stick with trying to get mecanum done. I already told you enough. I don't want to spoon feed you anything.
|
Re: Mecanum Drive
Quote:
Time we have a chat about helping teammates learn. Some people learn best by being pointed in a direction and being told make a mess. Some people don't learn this way. Some people need lots of direction and support. It is up to you to learn which way is most effective. |
Re: Mecanum Drive
Quote:
but swerve... with servo feed over rotation of the wheel and also feeding the pwm is like.. ok pwm i just feed the scalar value for joystick but for servo how should i get the right angles and all those junks like ughh |
Re: Mecanum Drive
Quote:
|
Re: Mecanum Drive
Quote:
and i was asking for getting the angle not pid. |
Re: Mecanum Drive
Quote:
Converting 3-degree-of-freedom joystick commands into holonomic values for wheel speed and wheel steering angle for swerve drive is straightforward. The challenge is downstream from there: how to actually control the wheels once you've calculated what their speeds and angles should be. These control algorithms may include logic to filter the commands to prevent undesired (but theoretically legal) commands to, for example, suddenly turn the wheels 90 degrees from the present high-speed direction. Many teams also implement driver interfaces which simplify the presentation to the driver in terms of more familiar and intuitive control. There are many different ways to do this; each team seems to have their own preferred approach. |
Re: Mecanum Drive
Quote:
Let measured_wheel_angle be the value read from your wheel angle sensor. Assuming both read degrees clockwise and are zeroed at the same angular position, the code for finding the shortest-path clockwise angle error is: Code:
angle_error = wheel_angle_command - measured_wheel_angle;If you are using a canned PID (from e.g. the WPI Library) you will need to convert that angle_error to a setpoint and a process_variable. You can do it like so: Code:
setpoint = angle_error; |
Re: Mecanum Drive
As adorable as your team chats are, I would recommend you keep them at meetings ;)
Below is the heart of the mecanum code that 2052 has been using for 4 years now: Code:
wFL = velocity - rotation - strafe;For whatever reason, we have never used WPI's or Labview's built in mecanum functions. Possibly because we have been using mecanum since the IFI controller. While mecanum requires no trig or high level math to implement, it does require physics to understand. Understanding the force vectors that allow the wheels to strafe makes it even more fascinating, and sharing the knowledge of how it works would be a great team meeting. |
Re: Mecanum Drive
Quote:
An alternate approach which may be more intuitive to some is to invert the joystick Y-axis value to produce a positive command for forward motion, and revise the wheel speed calculation like so: Code:
front_left = forward + clockwise + right; |
Re: Mecanum Drive
Quote:
I think the IFI joystick axes were actually "forward is higher value" and "right is lower value", so 2052's original code ends up matching your kinematics exactly. |
Re: Mecanum Drive
Quote:
Quote:
In the code Tanis posted, the "velocity" command would be negative when you want the wheels to spin in the forward direction. |
Re: Mecanum Drive
Quote:
|
Re: Mecanum Drive
Quote:
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. |
Re: Mecanum Drive
Quote:
Edit: saw that my student lead already posted... nicely done Alex.. |
Re: Mecanum Drive
Quote:
Quote:
|
| 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