![]() |
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. |
| 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